Click to See Complete Forum and Search --> : Unable to mount using NFS. ONLY AT BOOTUP!


chiefsmt
04-01-2002, 11:24 PM
I have two Linux computers (SuSE 7.3). One I have setup to export a certain directory to any computer on my subnet, using 192.168.1.*. This works fine as I am able to use the mount command on the second Linux system (laptop) to connect to the remote directory.

What does not work is when I try to setup the laptop to mount the remote directory at bootup. I'm adding the proper command line to fstab ( i think ), but when I boot the system I get an error that looks something like: "(NFS)mount: RPC: unable to send; errno=network is unreachable". Once the system completes it's boot, I can use the mount command and connect right up. I used YaST2 -> NFS Client to add the entry in the fstab. I believe I did this correctly.

Right now, I am using a LinkSYS Cable/DSL router. I'm using the DHCP service in the router; however, the Linux box that I'm exporting from has a static IP. I'm wondering if my laptop is failing to get an IP address assigned in time so the mount will occur.

Any help would be great!

FuSnickens
04-02-2002, 09:07 AM
I don't know for sure, but looking at the boot sequence on my RH machine, the filesystems are mounted before the networking package is initialized. Could it be that the mount is trying to happen before your network cards are brought up? Maybe you should try putting the mount command in /etc/rc.d/rc.local, which should be executed after everything is started up.
Just a thought...hope you get it working!

chiefsmt
04-03-2002, 12:12 AM
As I suspected, the laptop does not seem to be receiving an IP address "soon enough" from the DHCP service in the router. When I assign a static IP to the laptop, the command in "fstab" executes properly and the mount succeeds.

I tried using the SuSE 7.3 equivalent to rc.local ( /etc/init.d/boot.local ), but I receive the the same error as previously listed. With the exception that the error happens a lot sooner in the boot sequence. If someone knows of another script to put the mount command into, please let me know.

It doesn't make sense that this fails when I configure the laptop for DHCP, but succeeds when I assign a static IP. The command in fstab should not execute until the system receives it's IP via DHCP. To me, this sounds like a bug. This should work when using DHCP. Is it possible this is a bug?

FuSnickens
04-03-2002, 12:31 AM
I've never used SuSE, but on my RH box, the files located in /etc/rc.d/init.d get executed first, then, those outside of this directory, in /etc/rc.d are run later (comment excerpt from my rc.local file in /etc/rc.d):
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here...

So, the files in /etc/rc.d/init.d are run first, then the commands in /etc/rc.d/rc.local are executed. Again, this is on my RH system; your system may be different. But, if I use an explicit mount command in my rc.local script, it wont be run until *after* the network stuff is set.