iPXE discussion forum

Full Version: Booting CentOS6.5 kernel failed with UEFI mode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We have erase the i350 NIC card with efirom, and the following script was used in our PXE server.

#!ipxe
kernel tftp://xxx.xxx.xxx.xxx/boot/vmlinuz initrd=initrd.img
initrd tftp://xxx.xxx.xxx.xxx/boot/initrd.img
boot

Such a scrip works normally with the ubuntu1404, which kernel verison is 3.13.

But we tried to use it with the CentOS6.5 or the Ubuntu 1004, which kernel version is about 2.6.XX

We met the following errors with the kernel.
"Could not select: Exec format error (http://ipxe.org/2e008081)
Could not boot image: Exec format error (http://ipxe.org/2e008081)"

Is there any solution for supporting boot the old 2.6 kernel with iPXE in the UEFI mode?
Code:
#!ipxe
initrd tftp://xxx.xxx.xxx.xxx/boot/initrd.img
chain tftp://xxx.xxx.xxx.xxx/boot/vmlinuz
Just tried this script, still failed with the same error...

(2015-05-14 22:58)MultimediaMan Wrote: [ -> ]
Code:
#!ipxe
initrd tftp://xxx.xxx.xxx.xxx/boot/initrd.img
chain tftp://xxx.xxx.xxx.xxx/boot/vmlinuz
(2015-05-14 07:59)Hudson Wrote: [ -> ]#!ipxe
kernel tftp://xxx.xxx.xxx.xxx/boot/vmlinuz initrd=initrd.img
initrd tftp://xxx.xxx.xxx.xxx/boot/initrd.img
boot
Looks good, the initrd= is needed under efi for the kernel to know which file on the efi fs that should be used.

(2015-05-14 07:59)Hudson Wrote: [ -> ]But we tried to use it with the CentOS6.5 or the Ubuntu 1004, which kernel version is about 2.6.XX

We met the following errors with the kernel.
"Could not select: Exec format error (http://ipxe.org/2e008081)
Could not boot image: Exec format error (http://ipxe.org/2e008081)"

Is there any solution for supporting boot the old 2.6 kernel with iPXE in the UEFI mode?

iPXE only supports booting efi binaries and not linux kernels.
That means that the kernel needs to have efi stub enabled to be able too boot from ipxe, also 32 bit and 64 bit needs to match between firmware -> ipxe -> kernel and finaly secure boot needs to be disabled. (depending on the BIOS/Firmware implementation I have seen ipxe boot with secure boot enabled but it was unable to boot kernel)
I'm running into the same problem, I'd like to use iPXE for Kickstarting installations in VMs. The ability to pass the serial to a script and preconfigure the kickstart file is really good. However I have to install CentOS 6.x which only comes with 2.6.32(with some backported patches), so no EFI Stub support possible. If I chainload something else (bootloader?) how can I preserve iPXE download-capability (over http instead of tftp) and the parameters from the ipxe-script? Is there a way to "bundle" an efi-bootloader, vmlinuz, initrd and pass the parameters from ipxe to it?
This issue is still observed with RHEL 6.8 and RHEL6.9 OSes. Can anyone suggest a workaround to overcome this issue.
I found some workarounds for this issue in the following link:

http://forum.ipxe.org/showthread.php?tid=7897
Reference URL's