LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-14-2010, 05:29 PM   #1
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Rep: Reputation: 15
Ubuntu 10.04 delay mounting network shares in fstab until network is up


Using Xubuntu 10.04 to connect to some Windows XP shares by adding lines to fstab.

The network shares are not mounted at boot, but can be mounted from the command line, after the OS has booted and everything is up. I am suspecting the network isn't up yet, when fstab is processed.

I tried adding the option "_netdev" to the relevant network share lines in fstab, but the shares still don't mount automatically at boot up. I read that this option only works for NFS and I am using CIFS. Can someone confirm that _netdev only works for NFS ?

I've seen solutions involving running a mount script after the OS is fully loaded, or running a cron job to periodically check the status of the share and mount if needed. Good workaround but doesn't address the root cause.

Is there any other way (besides the _netdev option) to delay mounting of network shares that appear in fstab until the network interface is up ?

Thanks :-)
 
Old 06-14-2010, 08:50 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
This should be handled by 'netfs'.. is it enabled ?
 
Old 06-15-2010, 12:00 AM   #3
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
hello kbp,

typing "chkconfig --list" at the prompt, I don't see netfs in the list. I assume that means netfs is not enabled ? Next steps ?

Thanks for your help :-)
 
Old 06-16-2010, 02:15 AM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Hmm... do you have /etc/[init.d|rc.d/init.d]/netfs ?
 
Old 06-16-2010, 12:21 PM   #5
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by kbp View Post
Hmm... do you have /etc/[init.d|rc.d/init.d]/netfs ?
Very new to Linux so I'm not sure what you mean by "[init.d|rc.d/init.d]" ????

I have /etc/init.d but that's it. No more subdirectories.

Do I need to enable netfs or install another package ?
 
Old 06-16-2010, 06:33 PM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Sorry... some distros have /etc/init.d as a symlink to /etc/rc.d/init.d - do you have '/etc/init.d/netfs' or /etc/rc.d/init.d/netfs' ?
 
Old 06-17-2010, 01:25 AM   #7
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
Ahhh....learned something new already.....

I have /etc/init.d but no sub directory "netfs", or any other sub directories within /etc/init.d

I have

/etc/rc0.d
/etc/rc1.d
/etc/rc2.d......

all the way up to /etc/rc6.d and /etc/rS.d, but none of these "rc(insertnumberhere).d" directories have sub directories.

I typed "gksudo Thunar" to make sure I could see everything, and I selected "Show Hidden Files" to make sure everything is visible. I used Catfish to search for "netfs" and no results.

Thanks again for your help :-)
 
Old 06-17-2010, 01:46 AM   #8
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
You'll only find files under /etc/init.d ... these are the scripts that start various services when your machine boots up. I would expect netfs to be there by default but I don't use your distro so I can't be sure.

cheers
 
Old 06-17-2010, 01:52 AM   #9
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
so is it safe to say netfs is not installed/enabled ?
 
Old 06-17-2010, 09:25 PM   #10
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
I guess so .. sorry, I thought it would be included in all distros
 
Old 06-17-2010, 09:57 PM   #11
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
Any ideas on how to install/enable it ? Googling "netfs" doesn't give much info. Ubuntu forums doesn't have much either.

Thanks again.
 
Old 06-18-2010, 07:54 AM   #12
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
If it's not already present then it's probably not available, there must be another method

Years ago I used to add 'mount -a -t nfs' to /etc/rc.local as it's run after all the init scripts, give it a try and let us know

cheers
 
Old 06-18-2010, 08:40 PM   #13
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
I added the mount commands to rc.local but it's still not executing at boot up.

Typing "bin/sh rc.local" at the prompt works fine after everything has loaded. All shares are mounted and accessible. I even added echo commands to rc.local to verify that each mount command in rc.local is being processed.

I also tried using the Xfce desktop environment manager to add autorun commands, but that didn't work at boot up either.

I think the issue is I have to somehow make the ethernet interface come up earlier.

When I boot up, Xfce shows all the stuff it's loading. I see "performing Autostart.." and other messages that tells what Xfce is loading, THEN I see the graphic on the desktop that says "Wired Network...connection established". The network is pretty much the last thing to come up. The only other thing that comes up after the "network connection established" message is the update notification, which makes sense.

All of the methods I try work fine after everything is loaded, but won't work at boot up.

So.....how do I go about forcing the ethernet interface to come up earlier in the boot process ?

This is kind of an odd problem because I have read from other posts that mounting network shares (samba, cifs, nfs, etc) work fine from fstab, rc.local, etc, etc. Maybe these people have their network interface loading earlier than mine ?

Thanks again for your help. Any info is GREATLY appreciated !!!!!! :-)
 
Old 06-19-2010, 12:34 AM   #14
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
progress.....

I removed Network Manager and all related packages and configured the network interface manually.

Now rc.local is at least attempting to mount at boot up but results are not consistent. There are three shares but I have yet to get all three to mount automatically at boot up. Sometimes only one mounts, sometimes two out of the three mount, etc, etc.

I added the line "sudo mount -a" to rc.local. I'll see if using the actual mount.cifs commands (instead of sudo mount -a) works any better.....
 
Old 06-24-2010, 08:36 PM   #15
politik
Member
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu 12.04 Precise Pangolin
Posts: 48

Original Poster
Rep: Reputation: 15
Marking this thread as solved. Removing/uninstalling Network Manager seems to allow the network interface to come up earlier, allowing scripts to access network resources.
 
  


Reply


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
Mounting network shares using kerberos ticket dlbuhl Linux - Networking 0 12-19-2006 11:53 AM
mounting network shares (KDE) Stefan J Linux - Newbie 5 11-16-2006 05:05 PM
Mounting Windows network shares at boot time? lowpro2k3 Slackware 6 05-16-2006 10:14 PM
mounting and viewing network shares GraemeK Linux - Networking 4 01-27-2004 04:23 AM
Mounting windows network shares at boot TennesseeJeff Linux - Networking 1 05-24-2002 01:58 PM


All times are GMT -5. The time now is 10:12 PM.

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