Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

\\\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.


share|improve this question
If the server is running Ubuntu, it is likely you need a / rather then a \ - "// " See – bodhi.zazen Jan 3 '14 at 21:01
@bodhi.zazen It may have had the / when I entered it, but it now reads out with the \ – douggro Jan 3 '14 at 22:42
Check the syntax ( / vs \ ) in fstab – bodhi.zazen Jan 3 '14 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 '14 at 1:00
After reading your question again, I think you need to follow djmadscribbler's advice. – bodhi.zazen Jan 4 '14 at 1:14
up vote 4 down vote accepted

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

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

See : 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

\\\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 '14 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 '14 at 9:13
This worked for me in Ubuntu 12.04 but not in Ubuntu 16.04. Has this changed in the latest version? – katu txakurra Apr 25 at 14:46
same here, not working in 16.04 – jcollum May 23 at 0:24
Note: I think _netdev actually works in 16.04, however credentials=/home/user/.smbcreds does no longer works. At least for me when I use user=, pass=, _netdev it works, when I use credentials=,_netdev it does not. Both work via sudo mount-a from the command line after booting. – jb510 Jun 5 at 2:59

Your Answer


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.