Ubuntu – Diskless with Ubuntu 12.04

12.04bootinitramfsnfspxe

I'm trying to setup a new diskless solution with ubuntu 12.04 without any success. I followed this Diskless Ubuntu HowTo

But the initramfs seems not to be able to mount my nfs share.

On my server side:

My /etc/exports

/srv/nfs4           192.168.0.0/24(fsid=0,rw,no_subtree_check)

/srv/nfs4/nfsroot   192.168.0.0/24(rw,no_root_squash,no_subtree_check,fsid=1,nohide,insecure,sync)

I'm able to mount my nfs share on standard Ubuntu installation without any problem.

I can mount my nfs on any client with those commands:

mount 192.168.0.3:/nfsroot /mnt

or

mount 192.168.0.3:/srv/nfs4/nfsroot /mnt

My /tftpboot/pxelinux.cfg/default config file is

DEFAULT vmlinuz-3.5.0-25-generic root=/dev/nfs initrd=initrd.img-3.5.0-25-generic nfsroot=192.168.0.3:/nfsroot ip=dhcp rw

I also tried

DEFAULT vmlinuz-3.5.0-25-generic root=/dev/nfs initrd=initrd.img-3.5.0-25-generic nfsroot=192.168.0.3:/srv/nfs4/nfsroot ip=dhcp rw.

What I got in initramfs:

With the setting [nfsroot=192.168.0.3:/nfsroot]

Diskless output:

mount call failed - server replied: Permission denied

On Syslog of my nfs server:

rpc.mountd[1266]: refused mount request from 192.168.0.10 for /nfsroot (/): not exported

With the setting [nfsroot=192.168.0.3:/srv/nfs4/nfsroot]

Diskless output:

mount: the kernel lacks NFS v3 support

On Syslog of my nfs server I got:

Mar 11 14:03:06 BootFromLan rpc.mountd[1266]: authenticated mount request from 192.168.0.10:834 for /srv/nfs4/nfsroot (/srv/nfs4/nfsroot)
Mar 11 14:03:06 BootFromLan rpc.mountd[1266]: refused unmount request from 192.168.0.10 for /root (/): not exported

Best Answer

Your first attempt seems to be wrong because the full path is not specified.

Your second attempt seems to be that there is a mismatch in nfs versions: The initramfs loads version 4 but the server only serves version 3.

Probably this might help:

https://help.ubuntu.com/community/SettingUpNFSHowTo

You might try to compile the TFTP-Served kernel with nfs-3-support, see lsinitramfs initrd.img-3.5.0-25-generic to check what's inside.

Related Question