Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 3 SMB shared drives I need to connect to for work purposes. I had Ubuntu 10.10 Maverick and had all my drives loaded into fstab to be auto-mounted. Everything worked fine for a while but just before I upgraded to 11.04 Natty, the fstab auto-mount stopped working. Unfortunately I don't know what changed I made to my machine or what update installed that made this occur.

// /home/brett/Desktop/apache smbfs guest,rw,iocharset=utf8,uid=1000,gid=1000 0 0
// /home/brett/Desktop/54321 smbfs guest,rw,iocharset=utf8,uid=1000,gid=1000 0 0
//freenas.local/shared/ /home/brett/Desktop/shared smbfs guest,rw,iocharset=utf8,uid=1000,gid=1000 0 0
//lamp/www/ /home/brett/Desktop/lamp smbfs username={snip},password={snip},rw,iocharset=utf8,uid=1000,gid=1000 0 0

When the machine boots, I run this command to get them to mount:

$ sudo umount /home/brett/Desktop/54321 /home/brett/Desktop/shared /home/brett/Desktop/apache; sudo mount -a 
[sudo] password for brett: 
umount: /home/brett/Desktop/54321: not mounted
umount: /home/brett/Desktop/shared: not mounted
umount: /home/brett/Desktop/apache: not mounted
Warning: mapping 'guest' to 'guest,sec=none'
Warning: mapping 'guest' to 'guest,sec=none'
Warning: mapping 'guest' to 'guest,sec=none'
mount error: could not resolve address for lamp: No address associated with hostname

(I run that umount as a just-in-case).

I looked through dmesg and some error logs and couldn't see why fstab was failing on my mounts. I see that my 'lamp' directive is failing, but that's because the machine is currently down.

share|improve this question

If it doesn't at boot and works fine after boot, it's entirely possible that the network isn't available at the time the mount is done. Networking comes up at login these days so this seems likely.

Two solutions to fix this issue:

  1. You should be able to add _netdev to your list of mount options. This forces the mount to wait for a network interface to come up. Win.

  2. Usurp the boot stack and configure your own network card. If it's a simple ethernet connection whacking something like this in /etc/network/interfaces might work:

    auto lo
    iface lo inet loopback
    auto eth0
    iface eth0 inet dhcp

    It's a little messier but this is what Ubuntu used to do. And it works for me.

If in doubt try both. At once if you need to.

share|improve this answer
I read in some other forums to add "_netdev" to my fstab, but that still doesn't work. My /etc/network/interfaces also already had the lines in it that you suggested. – bafromca May 24 '11 at 18:40
@Brett Argl. My bad. Those aren't the lines I was looking for. I'll find them and expand. That code just sets up the loopback (localhost) virtual adapter. – Oli May 24 '11 at 20:39
You can configure your connection to start at boot time by setting it as a "System Connection" in Network Manager. But cannot say if is early enough to make the share mounted. – enzotib Jun 26 '11 at 7:19

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.