2

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

2 Answers 2

0

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.

3
  • But when I try to mount my nfs share remotely I can mount with nfs V4: mount -t nfs4 192.168.0.3:/nfsroot /mnt. Mar 11, 2013 at 19:09
  • And when I list my mount, I can see: 192.168.0.3:/nfsroot on /mnt type nfs4 (rw,addr=192.168.0.3,clientaddr=192.168.0.2) Mar 11, 2013 at 19:11
  • 1
    Yes, since the module is not present in the initramfs. Perhapse replace root=/dev/nfs with rootfstype=nfs4 root=/dev/nfs4
    – aquaherd
    Mar 11, 2013 at 21:33
0

Maybe issue with the files, did you use cp -ax to copy the files from the DVD/image to NFS. See http://ubuntuforums.org/archive/index.php/t-921313.html

Or, it will automatically unmount the given NFS share when it doesn't find the kernel stuff it is looking for.

You might need the boot=casper or similiar. Check your NFS directory structure. dirname find /nfs -type f -name "*linuz*"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .