Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a CIFS share on my NAS that I want to have mounted at boot - it's used by my MythTV server as the main media store. I added an entry into fstab to have it mount but it doesn't. It appears that, after looking through my system logs, fstab is being read before my network interfaces are coming online. Is there any edit I can make to the fstab entry that would alter this?

The fstab entry for mounting the share is:

\\192.168.0.26\mythtv\media  /media/mybooklive  cifs  username=user,password=pass,umask=002,uid=136,gid=144,iocharset=utf8   0       0

It mounts fine after boot when I issue sudo mount -a and there are no other issues with it.

Thanks!

share|improve this question
1  
If the server is running Ubuntu, it is likely you need a / rather then a \ - "//192.168.0.26/mythtv/media " See wiki.ubuntu.com/MountWindowsSharesPermanently –  bodhi.zazen Jan 3 at 21:01
    
@bodhi.zazen It may have had the / when I entered it, but it now reads out with the \ –  douggro Jan 3 at 22:42
    
Check the syntax ( / vs \ ) in fstab –  bodhi.zazen Jan 3 at 22:43
    
@bodhi.zazen I'm pretty sure that the wiki article is what I followed when setting it up. I'll check syntax later when I get time to sit with my server. –  douggro Jan 4 at 1:00
    
After reading your question again, I think you need to follow djmadscribbler's advice. –  bodhi.zazen Jan 4 at 1:14

2 Answers 2

up vote 1 down vote accepted

It is a syntax error, I think you need a "/" rather then a "\", like this

//192.168.0.26/mythtv/media  /media/mybooklive  cifs  username=user,password=pass,_netdev,umask=002,uid=136,gid=144,iocharset=utf8  0 0

See : https://wiki.ubuntu.com/MountWindowsSharesPermanently for additional information.

share|improve this answer

Have you tried adding the option _netdev to your fstab entry? You would add it with the other options in your string like so

\\192.168.0.26\mythtv\media  /media/mybooklive  cifs  username=user,password=pass,_netdev,umask=002,uid=136,gid=144,iocharset=utf8   0       0

_netdev is supposed to delay the mount until after the network connects.

share|improve this answer
    
Can you add context to where that would be placed in the fstab line? With that, and a period where I can reboot the server when it's not being used, I will give it a try. Thanks for answering. –  douggro Jan 3 at 20:33
    
Turns out bodhi.zazen had the right track with his comment. I did give you an upvote for your help. Thanks! –  douggro Jan 4 at 9:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.