Fix for Debian Wheezy not mounting CIFS/SMB shares at boot time
Debian (Wheezy/7.5.0 in this case) uses numerous confsuing initscripts to mount network filesystems at boot time ;-)
/etc/network/if-up.d/mountnfs, which is responsible to mount the network filesystems who are listed in
/etc/fstab, such as CIFS/NFS etc. Don’t get irritated by the name, looking at the header of the
mountnfs.sh file reveals: “Also mounts SMB filesystems now, so the name of this script is getting increasingly inaccurate.” Heh.
CIFS shares in
/etc/fstab are not mounted at boot time but running
mount -a after the system has booted just mounts them fine.
After seeing some unsatisfactory workarounds on the internet, like adding a
@reboot cronjob wich runs
mount -a or by putting it in
/etc/rc.local, I decided to check the scripts. Welp,
mountnfs.sh does not even try to mount the network filesystems. Something is broken in there.
Add the following to
It finally works. *sigh*