Auto-mount windows share on boot - manual OK, auto not ok!
Apologies if I am missing important details - I am very new at this.
I am trying to mount a windows network share on boot, with little luck. Mounting manually (with mount -t) works fine, so I added a line to fstab. Forcing a remount with mount -a also works fine (although there is an odd error "[mntent]: warning: no final newline at the end of /etc/fstab")
However, when I reboot, the network share does not auto-mount.
I tried adding "sudo mount -a" to rc.local, but no improvement.
Oddly, I was intending to use smb4k, but although the "remount on restart" option was selected, it also failed on reboot!
I like the explanation of not being able to mount until the network has started up, but that does not explain the failure of rc.local, right?
If nothing else, could someone please advise on what logs to check for messages?
Thank you in advance for your help!
Look for netdev option.
Add a new line to the end of your /etc/fstab.
Thank you for the quick response.
True to form I did find the solution, much later last night, exactly as you suggested.
For future noob (like me!) reference the _netdev option forces the mount command to wait until the network connection is up and running, and the correct use is
//wherever/blah /somewhere/blah cifs guest,_netdev,uid=1000,iocharset=utf8,codepage=unicode,unicode 0 0
Yes, I know the guest authentication sucks, but this is for a windows share which defaults to no authentication required, and all of this is behind a firewall so I am not too worried. As my bravery increases I may fix it later.
Thank you again.
|All times are GMT -5. The time now is 04:39 AM.|