Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-11-2008, 09:41 PM   #1
LQ Newbie
Registered: Feb 2008
Distribution: Kubuntu
Posts: 6

Rep: Reputation: 0
Auto-mount windows share on boot - manual OK, auto not ok!

Dear All,

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!
Old 02-12-2008, 06:30 PM   #2
Registered: Jun 2004
Posts: 307

Rep: Reputation: 42
man mount

Look for netdev option.

Add a new line to the end of your /etc/fstab.
Old 02-12-2008, 06:42 PM   #3
LQ Newbie
Registered: Feb 2008
Distribution: Kubuntu
Posts: 6

Original Poster
Rep: Reputation: 0
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-Mounting a Windows Share On Starup FlamingBee Linux - Networking 30 07-25-2005 08:38 AM
Win share will not auto mount, inclu in Fstab ZingSter SUSE / openSUSE 4 04-06-2005 07:22 AM
autofs enabled in kernel but auto.mount and auto.master are NOT in /etc! Alybyzrp Linux - General 0 11-11-2003 12:26 PM
auto mount multiple windows on boot bax Linux - Software 13 02-23-2003 02:53 PM
auto mount windows share bloodhound1600 Linux - Networking 1 11-26-2002 04:16 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration