Ubuntu – Ubuntu 15.04 no longer mounts samba share on boot


I recently upgraded to ubuntu server 15.04 from 14.04. I have this line in my /etc/fstab:

// /mnt/mediaserver/ cifs  user=*****,password=*********,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=1000,gid=1000,nounix 0 0

yes, i know that this isn't 'safe' putting password in /etc/fstab but this machine isn't connected to anything but my local network, it's just for me to mess around with

Manually typing sudo mount -a after booting will mount the samba share, but I don't understand why it isn't loading on boot anymore. Thank you for any insight into what's going on.

Best Answer

This may be a problem with the newly introduced systemd.

Adding x-systemd.automount to the option of the cifs entry in the /etc/fstab file solved this problem for me. Note the drive won't be mounted until you access it (by doing ls or similar).

Your fstab should look like:

// /mnt/mediaserver/ cifs user=*****,password=*********,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=1000,gid=1000,nounix,x-systemd.automount 0 0

Source: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1458100