# NFS: no mounts a boot time

## f.kater

Hi,

I've got a problem with mounting via nfs - but only at boot time:

At boot time I see

Starting portmap  [OK]

Mounting network filesystems [!!]

So my nfs directory is not mounted this way. But when I manually type

```
mount -t nfs 192.168.0.23:/mydata /mnt/data
```

then it works and I have access to /mnt/data/...(etc)... 

Here is a part of my fstab in case it matters here:

```
192.168.0.23:/mydata  /mnt/data  rsize=8192,wsize=8192,timeo=14,intr   0 0
```

Do you have a hint for me?

Thanks

 Felix

----------

## DArtagnan

Enter th line inside the /etc/local.start  :Smile: 

mount -t nfs 192.168.0.23:/mydata /mnt/data

In this way i solved the problem...

----------

## f.kater

Thanks, pacman!  :Smile:  But isn't it better to do these things with fstab? I am afraid that the mounted directory will not be unmounted correctly, will it?

Thanks again

 Felix

----------

## DArtagnan

The question is if ALL YOUR LOCAL NETWORK is UP when fstab is readed and executed by Linux.

----------

## delta407

Right, it is better to put mounts in fstab. But, to ease your unmounting concerns, just put "umount /mnt/data" in /etc/conf.d/local.stop.

By the way, you forgot to set the filesystem type to NFS in your /etc/fstab, which is probably your real problem.  :Wink:  It goes between /mnt/data and your mount options.

----------

## f.kater

Hi pacman, hi delta407,

I see that there is a workaround with local.start and local.stop.

Thanks for that!

But coming back to the question why it doesn't work at boot time:

1) Sequence: NFS mounts are (tried to be) done nearly at the end of the boot process. Portmap is started right before.

2) I better should have copied/pasted my fstab... In the real fstab "nfs" is NOT missing... sorry!

So, do you think it is a question of sequence/time? I'd like to solve this problem (rather than do workarounds) because I am going to configure a lot of gentoo systems and a lot of mounts ...  :Confused:   Could I somehow influence the boot order for testing purpose? What would you try next?

Greetings,

Felix

----------

## delta407

/etc/init.d/netmount is the script that would mount your NFS shares, and it is configured to launch after the network is up (hence "need net"). To see what, exactly, doesn't come up right, remove the > /dev/null and replace it with > /root/netmount.log or something so you can see the actual error message.

----------

