The kernel is able to mount NFS shares, otherwise you couldn't use an nfs client in normal operations. No recompiling is necessary and not recommended.

With that being said, the immediate things that stick out to me is:

* You are missing selinux=0. A diskless client (which is what you're setting up) cannot run with SELinux enabled if the root disk is on a network filesystem. There's no other way around that.
* You are using the kernel itself, and not pxeboot form of the kernels (you should be using the pxeboot/vmlinux and pxeboot/initrd.img files found on the ISO's or dl.rockylinux.org/pub/rocky/9/BaseOS)

I would suggest doing those and then troubleshooting further.

-L

On Mon, 6 Feb 2023 at 23:38, Sandeep Gupta via rocky <rocky@lists.resf.org> wrote:
I have posted this question here as well: https://serverfault.com/questions/1122071/netbooting-centos-via-pxe-and-uefi-unable-to-mount-root-over-nfs-failed-to.

Essentially, the kernel is able to bootup but fails to mount the nfs root device. I am wondering if rocky linux kernel is able to mount nfs shares?
If not, what is the workaround? Would recompile of the kernel with nfs support work?
Below, is the grub entry  for reference
```
set default="0"
set timeout=5
set root=(tftp,192.168.0.185)
set prefix=($root)/grub2

menuentry "OS (UEFI PXE)" {
    linux /vmlinuz-5.14.0-162.6.1.el9_1.aarch64 root=/dev/nfs rw nfsroot=192.168.0.185:/nfs/rpi4_dfd9 rw ip=dhcp rootwait elevator=deadline
    initrd /initramfs-5.14.0-162.6.1.el9_1.aarch64.img
}

```

Thanks
-S 
_______________________________________________
rocky mailing list -- rocky@lists.resf.org
To unsubscribe send an email to rocky-leave@lists.resf.org


--

-L