Jump to content

Mount nfs-root over tcp (PXE boot) [MOVED]


mekatum

Recommended Posts

Hi all!
Please, fix init-script for mounting NFS-root over TCP. NFSv4 by default no listen UDP-ports. If PXE-server have NFSv4, KRD can not mount NFS-root and can not start.

Thanks you for your work!

 

//Mod Note: moved to the correct section.

Link to comment
Share on other sites

@Andrey Kirzhemanov 

I disable UDP in nfs.conf. NFS-server listen only TCP:

$ rpcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 33363 status
100024 1 tcp 39615 status
100005 1 udp 20048 mountd
100005 1 tcp 20048 mountd
100005 2 udp 20048 mountd
100005 2 tcp 20048 mountd
100005 3 udp 20048 mountd
100005 3 tcp 20048 mountd
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 3 tcp 2049 nfs_acl
100021 1 udp 60018 nlockmgr
100021 3 udp 60018 nlockmgr
100021 4 udp 60018 nlockmgr
100021 1 tcp 43269 nlockmgr
100021 3 tcp 43269 nlockmgr
100021 4 tcp 43269 nlockmgr

NFS-share:  

$ cat /etc/exports

/srv/tftpboot/mnt/live/krd 10.10.10.0/24(ro,wdelay,insecure,no_root_squash,all_squash,no_subtree_check,anonuid=1000,anongid=1000)

pxelinux config:

LABEL Kaspersky Rescue Disk 2018
LINUX ../mnt/live/krd/boot/grub/k-x86_64
INITRD ../mnt/live/krd/boot/grub/initrd.xz
APPEND nfsboot=10.10.10.41:/srv/tftpboot/mnt/live/krd/ net.ifnames=0 lang=en dostartx

Screenshot:

 As you can see, my NFS-server can ping. I try mount NFS-share manually, but I get “connection time out”. Then I add “tcp” option and NFS-share is successfully mounted. 

It seems that KRD init script can’t work with NFS v4 at all.

My mistake. My NFS-server by default provide NFSv3 and NFSv4, but not listen UDP (by default).

As I know, KRD based on SystemRescueCD 5.x.x., it not support NFSv4. You are right.
https://web.archive.org/web/20181016223523/http://www.system-rescue-cd.org/manual/PXE_network_booting/
 

Will you test fix of script  If i provide additional initrd file?

Yes, I can test.

Link to comment
Share on other sites

@mekatum 

Please, download additional initrd from here and place it somewhere in nfs share. Change pxelinux config:

LABEL Kaspersky Rescue Disk 2018
LINUX ../mnt/live/krd/boot/grub/k-x86_64
INITRD ../mnt/live/krd/boot/grub/initrd.xz,%some path%/initrd1.xz
APPEND nfsboot=10.10.10.41:/srv/tftpboot/mnt/live/krd/ net.ifnames=0 lang=en dostartx

and try to boot KRD. If something goes wrong then make photo of error.

Link to comment
Share on other sites

@Andrey Kirzhemanov 

I add new initrd to pxelinux config:

LABEL test
LINUX ../mnt/live/krd/boot/grub/k-x86_64
INITRD ../mnt/live/krd/boot/grub/initrd.xz,../mnt/live/initrd1.xz
APPEND nfsboot=10.10.10.41:/srv/tftpboot/mnt/live/krd/ net.ifnames=0 lang=en dostartx vga=791

NFS-share was be updated and work (old initrd work from this NFS-share and new initrd must work too)

$ ls -l mnt/live/

-r-xr-xr-x. 1 support support 15045948 Nov 7 15:16 initrd.xz
-r-xr-xr-x. 1 support support 13176 Nov 7 15:05 initrd1.xz

$ cat /etc/exports

/srv/tftpboot/mnt/live/krd 10.10.10.0/24(ro,wdelay,insecure,no_root_squash,all_squash,no_subtree_check,anonuid=1000,anongid=1000)

/srv/tftpboot/mnt/live/ 10.10.10.0/24(ro,wdelay,insecure,no_root_squash,all_squash,no_subtree_check,anonuid=1000,anongid=1000)


With kernel parameter “dostartx” I got kernelpanic
 

 

Without “dostartx” I got this
 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...