[SOLVED] Ubuntu 10.04 delay mounting network shares in fstab until network is up
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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 ?
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.
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 !!!!!! :-)
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.....