iPXE discussion forum

Full Version: CentOS 8 kernel cannot be started from UEFI iPXE
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have spent the past week getting to know the iPXE project and have been familiarizing myself with chainloading iPXE and then installing things over the network. I have been able to do this without issue for Debian 10, but now I ran into severe issues during the past 3 days trying to install CentOS 8.

My setup is as follows:
- RPi4 running pios arm64v8 as DHCP / TFTP / DNS / HTTP server
- Intel NUC10i5FNH2 as the testing machine
- Ubuntu Tower PC as my workstation

I am chainloading into the iPXE binary over tftp. Everything is using UEFI exclusively, SecureBoot is turned off. I embed a script into the iPXE binary that contains this code for booting CentOS:

initrd http://mirror.centos.org/centos-8/8.1.19...initrd.img
kernel http://mirror.centos.org/centos-8/8.1.19...ot/vmlinuz
imgargs vmlinuz initrd=initrd.img inst.repo=
sleep 2
boot ||

However when I run this immediately get an error saying:
- exit_boot() failed!
- efi_main() failed!

Unfortunately I have no idea what to do here. I searched the forum and google, but have not found a solution. Does someone here have an idea of what is wrong here? I have spent way too much time on this already without making any progress...

Thank you for your help.
Which Version of iPXE are you using? I tested your exact snippet on an Intel NUC5i5RYB in EFI mode and it boots just fine.

Since you said you embedded the script into the binary -- did you add a "dhcp" call before that snippet? Otherwise it will obviously fail downloading the initrd, and as there is no "||" at the end, iPXE will exit.
Hello simon,
yes I added a dhcp call. I'm building the ipxe.efi binary from the latest ipxe source code from the github repo. The build command is the usual:
cd ipxe/src && make bin-x86_64-efi/ipxe.efi EMBED=scripts/test.ipxe

As I said earlier I can install Debian, Ubuntu, Windows 10, etc. and it works just fine. The only problem is with CentOS 8 producing the exit_boot_failed() efi_main_failed() error.

Unfortunately I don't have a non-NUC computer here to test with... because if it works for you then that might be the problem.

There seems to be a thread on the RedHat forum about his but I do not have a subscription and therefore can't read it. https://access.redhat.com/solutions/5091541
If someone has a working RedHat subscription and might take a look if this contains a solution that would be nice.
Ah, it's fixed in the most recent kernel releases for 8.2 (kernel-4.18.0-193.13.2.el8_2) and 8.1 (kernel-4.18.0-147.24.2.el8_1), but not yet 8.3 (will be in GA build).

The fix was this: https://www.lkml.org/lkml/2018/11/30/717
Thanks for looking that up Smile

I switched to the link:
http://mirror.centos.org/centos-8/8.2.20...s/pxeboot/ ...

But the problem still occurs. Shouldn't that be fixed according to that answer? Or is there still problem with that release? Sorry, I'm not experienced with RHEL / CentOS.
Me neither, just happen to have access to that page Wink
I don't want to fullquote it here verbatim, but it doesn't explicitly mention netboot, or iPXE, so there's an off chance that's just another bug manifesting in the same error messages. You could try booting the regular CentOS installer via EFI from a USB key and see if you get the same errors.

Or, for some reason, the CentOS folks didn't rebuild with that fix applied yet, or just didn't copy it into the pxeboot dir. Maybe track down when the above mentioned kernels were released. The article says last updated in August while the CentOS vmlinuz is from May (but that doesn't necessarily mean the issue was only fixed then).
Yeah I'm just gonna stop for now here. If that is the issue it will resolve itself over time. Otherwise I will check back in a few months and continue some troubleshooting.

Anyways, thank you very much for your help.
This works for me:

set repo http://mirror.centos.org/centos-8/8.2.2004/BaseOS/x86_64/os/
set imgargs initrd=initrd.img inst.repo=${repo} nomodset

kernel ${centos}/vmlinuz ${imgargs}
initrd ${centos}/initrd.img

Adjust your repo URL and you should be good.
This issue is also hit on RH8.2 and 8.1. It is all right on iPXE on 21th July git pull. I also find RH8.3 is good on the recently iPXE build.
It looks has been fixed on this commit,
Reference URL's