I have posted this question here as well: https://serverfault.com/questions/1122071/netbooting-centos-via-pxe-and-uefi....
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
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....
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
I don't believe you need a 'special' pxeboot kernel - but you do need the NFS dracut and kernel modules in the initrd - the initrd supplied in the images sub-directory on the install ISO does have these - although this will limit you to the installer kernel version and not later bug/security fixed versions (that initrd may also have extras used to start the installer which aren't needed?)
You can create your own initrd with dracut that has the required NFS root support - I haven't done this on Rocky 9, but have done so many times with x86_64 CentOS 7 with pxelinux (not UEFI PXE) - but I'm guessing the process is similar?
On CentOS 7, I create the NFS root initrd with something like:
dracut -m "nfs network base" initrd_file kernel_version
(you may need extra kernel modules included with the '--add-drivers' option depending on your hardware)
You have to have the required kernel version installed - and make sure your NFS root file system has the matching /lib/modules/$kernel_version tree
Your PXE kernel file will then be the /boot/vmlinuz-$kernel_version file and the initrd file as above
James Pearson ________________________________________ From: Louis Abel via rocky rocky@lists.resf.org Sent: 07 February 2023 07:27 To: Rocky Linux General Mailing List Cc: Louis Abel Subject: [rocky] Re: netbooting rocky linux : unable to nfs mount the root file system
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 https://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....
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
Using, the selinux =0 and using the pxeboot/vmlinux and pxeboot/initrd.img files fixed this issue. :). Thank you so much for your help. @James I am not super clear on how to follow those steps or what is the benefit over using the supplied pxeboot images?
On Tue, Feb 7, 2023 at 2:26 PM James Pearson via rocky rocky@lists.resf.org wrote:
I don't believe you need a 'special' pxeboot kernel - but you do need the NFS dracut and kernel modules in the initrd - the initrd supplied in the images sub-directory on the install ISO does have these - although this will limit you to the installer kernel version and not later bug/security fixed versions (that initrd may also have extras used to start the installer which aren't needed?)
You can create your own initrd with dracut that has the required NFS root support - I haven't done this on Rocky 9, but have done so many times with x86_64 CentOS 7 with pxelinux (not UEFI PXE) - but I'm guessing the process is similar?
On CentOS 7, I create the NFS root initrd with something like:
dracut -m "nfs network base" initrd_file kernel_version
(you may need extra kernel modules included with the '--add-drivers' option depending on your hardware)
You have to have the required kernel version installed - and make sure your NFS root file system has the matching /lib/modules/$kernel_version tree
Your PXE kernel file will then be the /boot/vmlinuz-$kernel_version file and the initrd file as above
James Pearson ________________________________________ From: Louis Abel via rocky rocky@lists.resf.org Sent: 07 February 2023 07:27 To: Rocky Linux General Mailing List Cc: Louis Abel Subject: [rocky] Re: netbooting rocky linux : unable to nfs mount the root file system
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 https://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... .
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
I don't know what you are doing with you NFS root set up, but if a security issue or critical bug fix is in a later kernel release, then you will need to build a new initrd if you want to use the newer kernel release
James Pearson ________________________________________ From: Sandeep Gupta via rocky rocky@lists.resf.org Sent: 08 February 2023 04:50 To: Rocky Linux General Mailing List Cc: James Pearson; Sandeep Gupta Subject: [rocky] Re: netbooting rocky linux : unable to nfs mount the root file system
Using, the selinux =0 and using the pxeboot/vmlinux and pxeboot/initrd.img files fixed this issue. :). Thank you so much for your help. @James I am not super clear on how to follow those steps or what is the benefit over using the supplied pxeboot images?
On Tue, Feb 7, 2023 at 2:26 PM James Pearson via rocky <rocky@lists.resf.orgmailto:rocky@lists.resf.org> wrote: I don't believe you need a 'special' pxeboot kernel - but you do need the NFS dracut and kernel modules in the initrd - the initrd supplied in the images sub-directory on the install ISO does have these - although this will limit you to the installer kernel version and not later bug/security fixed versions (that initrd may also have extras used to start the installer which aren't needed?)
You can create your own initrd with dracut that has the required NFS root support - I haven't done this on Rocky 9, but have done so many times with x86_64 CentOS 7 with pxelinux (not UEFI PXE) - but I'm guessing the process is similar?
On CentOS 7, I create the NFS root initrd with something like:
dracut -m "nfs network base" initrd_file kernel_version
(you may need extra kernel modules included with the '--add-drivers' option depending on your hardware)
You have to have the required kernel version installed - and make sure your NFS root file system has the matching /lib/modules/$kernel_version tree
Your PXE kernel file will then be the /boot/vmlinuz-$kernel_version file and the initrd file as above
James Pearson ________________________________________ From: Louis Abel via rocky <rocky@lists.resf.orgmailto:rocky@lists.resf.org> Sent: 07 February 2023 07:27 To: Rocky Linux General Mailing List Cc: Louis Abel Subject: [rocky] Re: netbooting rocky linux : unable to nfs mount the root file system
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 https://dl.rockylinux.org/pub/rocky/9/BaseOShttps://url.avanan.click/v2/___https://dl.rockylinux.org/pub/rocky/9/BaseOS___.YXAzOnRlY2huaWNvbG9yOmE6bzpkOTBkYjM1Mzg1YWZlOTMwYWRlMzhkM2U4ODc4YmM4Yzo2OjhmN2E6ZGM4ZjVmOTA3ZmZiMDM2ZjU2MWM0MDhjNDllMzg2Y2Y5ZTk3MTJlNWY3M2ZmMGMyM2Y3MTI2Y2FiODA4NGY4NzpoOlQ)
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.orgmailto:rocky@lists.resf.org> wrote: I have posted this question here as well: https://serverfault.com/questions/1122071/netbooting-centos-via-pxe-and-uefi...https://url.avanan.click/v2/___https://serverfault.com/questions/1122071/netbooting-centos-via-pxe-and-uefi-unable-to-mount-root-over-nfs-failed-to___.YXAzOnRlY2huaWNvbG9yOmE6bzpkOTBkYjM1Mzg1YWZlOTMwYWRlMzhkM2U4ODc4YmM4Yzo2OjBmMGE6ZDI0OGM1OTg4Y2UzY2ZkYjdmZjI3ZjJiNjQxMjYzYTJiNTE5OWRkMDgzZTIxZTYzMjgyZmNjOWZhY2IwMmRmYjpoOlQ.
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.orgmailto:rocky@lists.resf.org To unsubscribe send an email to rocky-leave@lists.resf.orgmailto:rocky-leave@lists.resf.org