Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CentOS 8 kernel cannot be started from UEFI iPXE
2020-10-08, 16:17
Post: #1
CentOS 8 kernel cannot be started from UEFI iPXE
Hello,
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=http://192.168.178.2/centos8
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.
Find all posts by this user
Quote this message in a reply
2020-10-13, 13:59 (This post was last modified: 2020-10-13 14:01 by simon.)
Post: #2
RE: CentOS 8 kernel cannot be started from UEFI iPXE
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.
Find all posts by this user
Quote this message in a reply
2020-10-14, 11:27
Post: #3
RE: CentOS 8 kernel cannot be started from UEFI iPXE
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.
Find all posts by this user
Quote this message in a reply
2020-10-14, 12:46 (This post was last modified: 2020-10-14 13:06 by simon.)
Post: #4
RE: CentOS 8 kernel cannot be started from UEFI iPXE
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
Find all posts by this user
Quote this message in a reply
2020-10-14, 13:52
Post: #5
RE: CentOS 8 kernel cannot be started from UEFI iPXE
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.
Find all posts by this user
Quote this message in a reply
2020-10-14, 14:18
Post: #6
RE: CentOS 8 kernel cannot be started from UEFI iPXE
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).
Find all posts by this user
Quote this message in a reply
2020-10-14, 15:40
Post: #7
RE: CentOS 8 kernel cannot be started from UEFI iPXE
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.
Find all posts by this user
Quote this message in a reply
2020-11-08, 21:09
Post: #8
Wink RE: CentOS 8 kernel cannot be started from UEFI iPXE
This works for me:

Code:
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
boot

Adjust your repo URL and you should be good.
Find all posts by this user
Quote this message in a reply
2020-11-23, 06:33
Post: #9
RE: CentOS 8 kernel cannot be started from UEFI iPXE
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.
Find all posts by this user
Quote this message in a reply
2021-01-11, 03:01
Post: #10
RE: CentOS 8 kernel cannot be started from UEFI iPXE
It looks has been fixed on this commit,
https://github.com/ipxe/ipxe/commit/6769a7c3c
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)