What's new
  • Please do not post any links until you have 3 posts as they will automatically be rejected to prevent SPAM. Many words are also blocked due to being used in SPAM Messages. Thanks!

cant figure out how to automount raspi OS

Shadowmeph

Well-known member
Joined
Oct 3, 2007
Messages
4,562
spent all morning trying to automount a drive tha tis connected to my linksys routers usb I mean it is moubnted and I can access it from any pc and move files around from any windows pc and Ican access the HD via my raspi but I cannot get it to automount so thatI can save files from my rasp pi os to that drive
 

supaflyx3

Well-known member
Joined
Jun 12, 2010
Messages
3,193
Location
Langley, BC
First install cifs utils

Code:
sudo apt-get install cifs-utils

Then create a folder in your home directory to mount the share to.

Code:
mkdir /home/*yourusername*/routershare

Change permissions so only your user and users in your group have write access

Code:
chmod +775 /home/*yourusername*/routershare

Edit your fstab so your share is mounted at every boot

Code:
sudo nano /etc/fstab

and paste this in the bottom of the file, and hit ctrl+x to save and exit.

Code:
//*ipaddressofrouter*/*sharename*   /home/*yourusername*/routershare cifs user=*usernamesetinrouter*,pass=*passwordyousetinrouter* 0 0

Reboot and it should be mounted, I don't remember if that router supports NFS shares, but if it does you should be using that with linux and the instructions are a little different.
 

Shadowmeph

Well-known member
Joined
Oct 3, 2007
Messages
4,562
First install cifs utils

Code:
sudo apt-get install cifs-utils

Then create a folder in your home directory to mount the share to.

Code:
mkdir /home/*yourusername*/routershare

Change permissions so only your user and users in your group have write access

Code:
chmod +775 /home/*yourusername*/routershare

Edit your fstab so your share is mounted at every boot

Code:
sudo nano /etc/fstab

and paste this in the bottom of the file, and hit ctrl+x to save and exit.

Code:
//*ipaddressofrouter*/*sharename*   /home/*yourusername*/routershare cifs user=*usernamesetinrouter*,pass=*passwordyousetinrouter* 0 0

Reboot and it should be mounted, I don't remember if that router supports NFS shares, but if it does you should be using that with linux and the instructions are a little different.
cool will try that . I did do the :
Code:
mkdir /home/*yourusername*/routershare
and the adding the fstab was getting error folder doesn't exist but I was tired so I will try again today
 

Shadowmeph

Well-known member
Joined
Oct 3, 2007
Messages
4,562
the drive mounts but its telling me mount: /home/pi/router/x: operation permitted for root only I think it is becasue the onlyway I could get chmod to work is adding sudo in front ot of sudo chmod +775 becasue I was getting this if I didnt add sudo "
chmod: changing permissions of '/home/pi/router/x': Operation not permitted"
 

supaflyx3

Well-known member
Joined
Jun 12, 2010
Messages
3,193
Location
Langley, BC
Yes that is why. Are you logged in as the user pi? You can chmod it to 777 with sudo and that will give everyone read & write permissions. Generally that is bad practice and should be avoided if you can.
 

Shadowmeph

Well-known member
Joined
Oct 3, 2007
Messages
4,562
hmm ok so I think that I actually dont have a user name in router not like all of the other routers I use . the way linksys routers are set up you make an account then once the account is made ( which I really dont like) you just sign in using a password maybe this is messing things up as it is I cannot sign in using any creditentuals when I click on the mounted folder I can connect anonymousy and access file read . this is the one t hing that has always messed me up with linux type os's I tryed to connect using the email address for my account but that doesnt work . and again side note I have knopw issues connected adding, removing files from any of my windows machines
 
Last edited:

Latest posts

Twitter

Top