Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] no NFS root with netboot (solution: UDP needed)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 351

PostPosted: Mon Aug 17, 2015 11:07 pm    Post subject: [SOLVED] no NFS root with netboot (solution: UDP needed) Reply with quote

Still trying to get a netboot kernel running
My kernel loads from tftp, and I have a root system exported (exportfs -v says
Code:
/mnt/nfs/netboot      192.168.0.0/255.255.0.0(rw,wdelay,insecure,no_root_squash,no_subtree_check,sec=sys,rw,insecure,no_root_squash,no_all_squash)

From another PC, I can access this share without problems

The client kernel has following NFS related settings:
Code:
grep NFS /usr/src/linux-3.18.12-gentoo/.config
CONFIG_KERNFS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_SWAP=y
CONFIG_NFS_V4_1=y
CONFIG_NFS_V4_2=y
CONFIG_PNFS_FILE_LAYOUT=y
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
# CONFIG_NFS_V4_1_MIGRATION is not set
CONFIG_ROOT_NFS=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFS_DEBUG=y
# CONFIG_NFSD is not set
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y


The server kernel has following settings:
Code:
CONFIG_KERNFS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V2=m
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_SWAP is not set
CONFIG_NFS_DEBUG=y
CONFIG_NFSD=m
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
CONFIG_NFS_COMMON=y


I start the kernel with following settings in pxelinux
append ip=dhcp nfsroot=192.168.4.1:/mnt/nfs/netboot root=/dev/nfs init=/sbin/init debug nfsrootdebug vga=0x327 raid=noautodetect

The kernel starts and finds a network address 192.168.4.59, the rootserver, and the rootpath
Then it looks for nfs root.

On the NFS server, I see the following being logged:
Code:
Aug 18 00:27:47 [rpc.mountd] from_local: updating local if addr list
Aug 18 00:27:47 [rpc.mountd] from_local: checked 10 local if addrs; incoming address not found
Aug 18 00:27:47 [rpc.mountd] check_default: access by 192.168.4.59 ALLOWED
Aug 18 00:27:47 [rpc.mountd] Received NULL request from 192.168.4.59
Aug 18 00:27:47 [rpc.mountd] check_default: access by 192.168.4.59 ALLOWED (cached)
Aug 18 00:27:47 [rpc.mountd] Received MNT1(/mnt/nfs/netboot) request from 192.168.4.59
Aug 18 00:27:47 [rpc.mountd] authenticated mount request from 192.168.4.59:814 for /mnt/nfs/netboot (/mnt/nfs/netboot)
Aug 18 00:27:52 [rpc.mountd] check_default: access by 192.168.4.59 ALLOWED (cached)
Aug 18 00:27:52 [rpc.mountd] Received NULL request from 192.168.4.59
Aug 18 00:27:52 [rpc.mountd] check_default: access by 192.168.4.59 ALLOWED (cached)
Aug 18 00:27:52 [rpc.mountd] Received MNT1(/mnt/nfs/netboot) request from 192.168.4.59
Aug 18 00:27:52 [rpc.mountd] authenticated mount request from 192.168.4.59:838 for /mnt/nfs/netboot (/mnt/nfs/netboot)
Aug 18 00:28:02 [rpc.mountd] check_default: access by 192.168.4.59 ALLOWED (cached)
Aug 18 00:28:02 [rpc.mountd] Received NULL request from 192.168.4.59
Aug 18 00:28:02 [rpc.mountd] check_default: access by 192.168.4.59 ALLOWED (cached)
Aug 18 00:28:02 [rpc.mountd] Received MNT1(/mnt/nfs/netboot) request from 192.168.4.59
Aug 18 00:28:02 [rpc.mountd] authenticated mount request from 192.168.4.59:925 for /mnt/nfs/netboot (/mnt/nfs/netboot)
Aug 18 00:28:23 [rpc.mountd] check_default: access by 192.168.4.59 ALLOWED (cached)
Aug 18 00:28:23 [rpc.mountd] Received NULL request from 192.168.4.59
Aug 18 00:28:23 [rpc.mountd] check_default: access by 192.168.4.59 ALLOWED (cached)
Aug 18 00:28:23 [rpc.mountd] Received MNT1(/mnt/nfs/netboot) request from 192.168.4.59
Aug 18 00:28:23 [rpc.mountd] authenticated mount request from 192.168.4.59:794 for /mnt/nfs/netboot (/mnt/nfs/netboot)
Aug 18 00:28:53 [rpc.mountd] check_default: access by 192.168.4.59 ALLOWED (cached)
Aug 18 00:28:53 [rpc.mountd] Received NULL request from 192.168.4.59
Aug 18 00:28:53 [rpc.mountd] check_default: access by 192.168.4.59 ALLOWED (cached)
Aug 18 00:28:53 [rpc.mountd] Received MNT1(/mnt/nfs/netboot) request from 192.168.4.59
Aug 18 00:28:53 [rpc.mountd] authenticated mount request from 192.168.4.59:848 for /mnt/nfs/netboot (/mnt/nfs/netboot)
Aug 18 00:29:23 [rpc.mountd] check_default: access by 192.168.4.59 ALLOWED (cached)
Aug 18 00:29:23 [rpc.mountd] Received NULL request from 192.168.4.59
Aug 18 00:29:23 [rpc.mountd] check_default: access by 192.168.4.59 ALLOWED (cached)
Aug 18 00:29:23 [rpc.mountd] Received MNT1(/mnt/nfs/netboot) request from 192.168.4.59
Aug 18 00:29:23 [rpc.mountd] authenticated mount request from 192.168.4.59:966 for /mnt/nfs/netboot (/mnt/nfs/netboot)


I understand this means that the request to access the nfs root is received and granted. However, after this, the (client) kernel says
VFS: Unable to mount root fs via NFS, trying floppy
VFS Cannot open a correct "root=" boot option; here are available partitions:
It then lists the harddisk of the client, and then panics.

My assumption is that I may be missing something either in the pxelinux incantation, or in the kernel configuration or in the NFS server configuration. I have read many pages on how this, and implemented all the suggestions (unless they were initramfs related), but maybe I still missed something.


Last edited by javeree on Wed Aug 19, 2015 8:55 am; edited 2 times in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Tue Aug 18, 2015 10:08 am    Post subject: Reply with quote

You'll be happy to read that : https://forums.gentoo.org/viewtopic-p-7592928.html#7592928
Back to top
View user's profile Send private message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 351

PostPosted: Wed Aug 19, 2015 8:53 am    Post subject: Reply with quote

I solved the issue. The problem I had was however not related to NFSv4, but the post above at least gave me a hint that triggered the solution. To verify which Version of NFS my Server was running, I issued

Code:
#rpcinfo -t localhost nfs
program 1000003 Version 3 ready and waiting


This was to be expected, since the server has no NFSv4 compiled in. Anyway, I changed my bootline to
Code:
append ip=dhcp nfsroot=192.168.4.1:/mnt/nfs/netboot,vers=3 root=/dev/nfs init=/sbin/init debug nfsrootdebug vga=0x327 raid=noautodetect


This time, the client still failed to find the NFS root, but dmesg told me 'Received MNT3', so at least I get a v3 request to a v3 server.

However, the place where I found the hint about rpcinfo also showed another command:

Code:
#rpcinfo -s localhost | grep nfs
   1000003    3      tcp     nfs      superuser


I had configured NFS to only listen to TCP, which is not the default for NFSv3. I reconfigured /etc/conf.d/nfs to also allow udp (I deleted '-U' from OPTS_RPC_NFSD), restarted the Server. Then checked

Code:
#rpcinfo -s localhost | grep nfs
   1000003    3      udp,tcp     nfs      superuser


and lo and behold, my client found a root nfs !

(The boot over this nfs root did not succeed due to many errors such as segfaults in libc, complaints about files being read only, no keyboard access to login once I miraculously reached a login prompt, ...), but those are other problems for another day.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum