Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-14-2010, 04:29 PM
|
#1
|
|
Member
Registered: Jun 2005
Location: Chicago
Distribution: Xubuntu 10.04 Lucid Lynx
Posts: 48
Rep:
|
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 :-)
|
|
|
|
06-14-2010, 07:50 PM
|
#2
|
|
Senior Member
Registered: Aug 2009
Posts: 3,497
|
This should be handled by 'netfs'.. is it enabled ?
|
|
|
|
06-14-2010, 11:00 PM
|
#3
|
|
Member
Registered: Jun 2005
Location: Chicago
Distribution: Xubuntu 10.04 Lucid Lynx
Posts: 48
Original Poster
Rep:
|
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 :-)
|
|
|
|
06-16-2010, 01:15 AM
|
#4
|
|
Senior Member
Registered: Aug 2009
Posts: 3,497
|
Hmm... do you have /etc/[init.d|rc.d/init.d]/netfs ?
|
|
|
|
06-16-2010, 11:21 AM
|
#5
|
|
Member
Registered: Jun 2005
Location: Chicago
Distribution: Xubuntu 10.04 Lucid Lynx
Posts: 48
Original Poster
Rep:
|
Quote:
Originally Posted by kbp
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 ?
|
|
|
|
06-16-2010, 05:33 PM
|
#6
|
|
Senior Member
Registered: Aug 2009
Posts: 3,497
|
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' ?
|
|
|
|
06-17-2010, 12:25 AM
|
#7
|
|
Member
Registered: Jun 2005
Location: Chicago
Distribution: Xubuntu 10.04 Lucid Lynx
Posts: 48
Original Poster
Rep:
|
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 :-)
|
|
|
|
06-17-2010, 12:46 AM
|
#8
|
|
Senior Member
Registered: Aug 2009
Posts: 3,497
|
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
|
|
|
|
06-17-2010, 12:52 AM
|
#9
|
|
Member
Registered: Jun 2005
Location: Chicago
Distribution: Xubuntu 10.04 Lucid Lynx
Posts: 48
Original Poster
Rep:
|
so is it safe to say netfs is not installed/enabled ?
|
|
|
|
06-17-2010, 08:25 PM
|
#10
|
|
Senior Member
Registered: Aug 2009
Posts: 3,497
|
I guess so .. sorry, I thought it would be included in all distros
|
|
|
|
06-17-2010, 08:57 PM
|
#11
|
|
Member
Registered: Jun 2005
Location: Chicago
Distribution: Xubuntu 10.04 Lucid Lynx
Posts: 48
Original Poster
Rep:
|
Any ideas on how to install/enable it ? Googling "netfs" doesn't give much info. Ubuntu forums doesn't have much either.
Thanks again.
|
|
|
|
06-18-2010, 06:54 AM
|
#12
|
|
Senior Member
Registered: Aug 2009
Posts: 3,497
|
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
|
|
|
|
06-18-2010, 07:40 PM
|
#13
|
|
Member
Registered: Jun 2005
Location: Chicago
Distribution: Xubuntu 10.04 Lucid Lynx
Posts: 48
Original Poster
Rep:
|
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 !!!!!! :-)
|
|
|
|
06-18-2010, 11:34 PM
|
#14
|
|
Member
Registered: Jun 2005
Location: Chicago
Distribution: Xubuntu 10.04 Lucid Lynx
Posts: 48
Original Poster
Rep:
|
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.....
|
|
|
|
06-24-2010, 07:36 PM
|
#15
|
|
Member
Registered: Jun 2005
Location: Chicago
Distribution: Xubuntu 10.04 Lucid Lynx
Posts: 48
Original Poster
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:39 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|