Hi,
I tried to set up CentOS 9 Stream PXE boot environment with the "genuine" repository(below) and saw CentOS successfully launch on remote UEFI based machine.
wget -P /var/lib/tftpboot/ \
http://mirror.stream.centos.org/9-strea ... OOTX64.EFI \
http://mirror.stream.centos.org/9-strea ... rubx64.efi \
http://mirror.stream.centos.org/9-strea ... T/grub.cfg
wget -P /var/lib/tftpboot/centos-st9/ \
http://mirror.stream.centos.org/9-strea ... ot/vmlinuz \
http://mirror.stream.centos.org/9-strea ... initrd.img
As my next step, I would like to update its kernel version. What I tried to do for this is..
1. build Linux kernel 5.18.12 from scratch. I confirmed it successfully ran on local CentOS 9 Stream machine.
2. simply add menuentry section in grub.cfg like below(the 2nd entry) with the newly created kernel and initramfs.img file:
3. As a result, boot process started but didn't end up in success like the attached picture.
# with original vmlinuz and initrd.img. Successfully run
menuentry 'Start CentOS 9 Stream [via PXE NFS]' --class centos --class gnu-linux --class gnu --class os {
linuxefi /centos-st9/vmlinuz root=nfs:192.168.20.1:/var/lib/tftpboot/centos-st9/root rw selinux=0 ip=dhcp
initrdefi /centos-st9/initrd.img
}
# with newly created kernel and initramfs.img file. boot process started but FAILED
menuentry 'Start CentOS 9 Stream with kernel 5.18.12 [via PXE NFS]' --class centos --class gnu-linux --class gnu --class os {
linuxefi /centos-st9/root/boot/vmlinuz-5.18.12 root=nfs:192.168.20.1:/var/lib/tftpboot/centos-st9/root rw selinux=0 ip=dhcp
initrdefi /centos-st9/root/boot/initramfs-5.18.12.img
#initrdefi /centos-st9/initrd.img
}
Any comments would be appreciated.
Thanks and regards,
How to create linux kernel and initramfs.img for PXE boot
-
- Posts: 5
- Joined: 2022/07/20 08:56:33
-
- Posts: 5
- Joined: 2022/07/20 08:56:33
Re: How to create linux kernel and initramfs.img for PXE boot
Hi
I forgot to upload the picture. Please find the attached showing the boot failure case. Regards
I forgot to upload the picture. Please find the attached showing the boot failure case. Regards
Re: How to create linux kernel and initramfs.img for PXE boot
That's the panic you get when you don't have a driver for the hard disk controller the install is on. So either you didn't build it or didn't include it in the initramfs or the initramfs is corrupt. Start by building using a copy of the original distro config file from /boot/config-$version.
Why are you even doing this?
Why are you even doing this?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 5
- Joined: 2022/07/20 08:56:33
Re: How to create linux kernel and initramfs.img for PXE boot
Thanks for the reply.
I would like to change linux kernel for testing the I/O device connected to the remote machine.
(I need to re-build linux kernel for the I/O device support)
Meanwhile, I tried using the "proven" pre-built kernel / initramfs.img coming with CentOS 9 Stream.
without saying they run on local drive without any problems. However in PXE environment, I encountered different error log as attached.
Any comments / suggestions would be appreciated.
Regards,
I would like to change linux kernel for testing the I/O device connected to the remote machine.
(I need to re-build linux kernel for the I/O device support)
Meanwhile, I tried using the "proven" pre-built kernel / initramfs.img coming with CentOS 9 Stream.
without saying they run on local drive without any problems. However in PXE environment, I encountered different error log as attached.
Any comments / suggestions would be appreciated.
Regards,
-
- Posts: 5
- Joined: 2022/07/20 08:56:33
Re: How to create linux kernel and initramfs.img for PXE boot
Hi
I tied re-generating initramfs.img with the following command:
dracut -f /boot/initramfs-[kernel version].img [kernel-version]
before executing the above command, I initially set the following dracut configuration into /etc/dracut.conf.d/pxeNFS.conf.
dracutmodules+=" nfs "
add_dracutmodules+=" nfs "
filesystems+=" nfs vfat msdos isofs ext4 xfs "
With this renewed initramfs.img, the dracut FATAL message vanished but boot up process is stuck at "Reached target multi-user system" prompt Any comments would be appreciated.
Regards,
I tied re-generating initramfs.img with the following command:
dracut -f /boot/initramfs-[kernel version].img [kernel-version]
before executing the above command, I initially set the following dracut configuration into /etc/dracut.conf.d/pxeNFS.conf.
dracutmodules+=" nfs "
add_dracutmodules+=" nfs "
filesystems+=" nfs vfat msdos isofs ext4 xfs "
With this renewed initramfs.img, the dracut FATAL message vanished but boot up process is stuck at "Reached target multi-user system" prompt Any comments would be appreciated.
Regards,
-
- Posts: 5
- Joined: 2022/07/20 08:56:33
Re: How to create linux kernel and initramfs.img for PXE boot
Hi,
I have finally solved the problem with /etc/dracut.conf.d/pxeNFS.conf silightly modified as follows:
filesystems+=" nfs "
add_dracutmodules+=" nfs "
Now linux kernel 5.18.14 successfully PXE-boots.
Thanks for all having interest in this topic.
Regards,
I have finally solved the problem with /etc/dracut.conf.d/pxeNFS.conf silightly modified as follows:
filesystems+=" nfs "
add_dracutmodules+=" nfs "
Now linux kernel 5.18.14 successfully PXE-boots.
Thanks for all having interest in this topic.
Regards,