# Kernel nfsroot options trouble, read only

## BoneMasterNo1

Hi, i have a little problem while booting a root filesystem over NFS. 

The basic kernel paramater are working fine, but only as read only.

 *Quote:*   

> 	kernel /gentoo/boot/kernel-genkernel-x86-2.6.27-gentoo-r8
> 
> 	append initrd=/gentoo/boot/initramfs-genkernel-x86-2.6.27-gentoo-r8 ip=dhcp real_root=/dev/nfs nfsroot=192.168.1.2:/tftproot/gentoo udev gentoo=nodevfs
> 
> 

 

If I am trying to add any nfs option to the nfsroot parameter the booting fails with

 *Quote:*   

> mount: 192.168.1.2:/tftproot/gentoo,nolock,rw,intr failed, reason given by server: permission denied.
> 
> NFS mounting failed, is the path correct?
> 
> The filesystem mounted at /dev/nfs does not appear a valid /.

 

----------

## smerf

When kernel starts it always mounts root fs read-only, initscripts take care of remounting.

----------

## cyrillic

 *BoneMasterNo1 wrote:*   

> If I am trying to add any nfs option to the nfsroot parameter the booting fails ...

 

Try adding rw as a kernel parameter, instead of an nfsroot parameter, and see if that helps.

EDIT : Oh wait, that will probably just mount your initrd read/write.

----------

## Hu

It appears that your NFS server is refusing to permit a read-write mount.  Did you configure it to allow that?

----------

## smerf

Add 'rw' option inside /etc/exports.

----------

## BoneMasterNo1

my exports is configured to use rw.

 *Quote:*   

> 
> 
> /tftproot/gentoo 192.168.1.0/24(rw,sync, no_subtree_check,no_root_squash,no_all_squash)
> 
> 

 

----------

## Paczesiowa

don't use  kernel-based mounting, use initramfs script which mounts and switches root, then you can experiment in familiar environment.

----------

## smerf

In my setup I always use ro,no_root_squash,async,no_subtree_check for nfsroot and mount it ro (which is default) at boot time:

```
LABEL gentoo_node

   KERNEL gentoo/kernel

   DEFAULT gentoo/kernel root=/dev/nfs nfsroot=192.168.1.0:/cluster/nfsroot/gentoo/ init=/boot/linuxrc ip=dhcp ro
```

it is remounted by init scripts (linuxrc execs init at the end).

----------

## BoneMasterNo1

ok, i have fixed it. 

after extracting the (genkernel)initramfs, i have changed the init scripts to mount the root filesystem in rw mode. There is a part reserved for remounting in rw that is commented as "FIX ME". So, and i am wondering me^^. With my modified initramfs its working fine. thx for tips.

----------

