[SOLVED] Automounting shares in Linux with fstab not working


Recommended Posts

I upgraded from Linux Mint 17.1 to 18.3 with a clean install, and am re-using the same fstab file. Local drives work fine, but although my unraid share mount points are visible under /mnt/sampleshare the shares are not actually mounted as I don't see any files or folders.

 

Below sample line from fstab; these worked on my previous Mint install. My uid and gid are still 1000.

//themonolith.local/sampleshare /mnt/sampleshare cifs guest,rw,uid=1000,gid=1000,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777

Any idea what's wrong?

Edited by Ulvan
Link to comment

Do the shares mount if you do a

  sudo mount-a

command in a terminal window?    If that works then there is probably a timing error during boot as to whether the network is available when the mount is tried.  Adding _netdev to the options section of the fstab entry may help rectify this. 

 

Link to comment

Found a fix: looks like fstab format has changed between Mint/Ubuntu/kernel/whatever versions.

 

Instead of

//themonolith.local/sampleshare /mnt/sampleshare cifs guest,rw,uid=1000,gid=1000,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777

 

I need to use this instead

//themonolith.local/sampleshare /mnt/sampleshare cifs username=guest,password=,rw,uid=1000,gid=1000,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777

 

This mounts the shares correctly at boot time!

Edited by Ulvan
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.