[ipxe-devel] iMac 2007 silently fails booting kernel

Michael Brown mcb30 at ipxe.org
Sat Jan 16 13:15:20 UTC 2016


On 16/01/16 12:35, Linus Lüssing wrote:
> I also extracted the 64-bit ELF vmlinux from the vmlinuz (bzimage)
> and tried booting that. However this gave me an "Exec format error"
> again, apparently.
>
> With UEFI and an Intel Core 2 Duo I should be able to chainload
> into a 64-bit ELF from the 64-bit ipxe.efi, shouldn't I? Or am I
> missing something obvious?

No; on a UEFI platform you can load only iPXE scripts and EFI 
executables.  You can't directly load an ELF binary.

>> The thing hangs in the following line of code:
>>
>> https://git.ipxe.org/ipxe.git/blob/HEAD:/src/core/image.c#l330
>>
>> So right when the kernel is supposed to be executed, I guess.
>> Hm, anyone having a hint where this function pointer is set?

I saw a very similar issue two days ago.

Try building with DEBUG=efi_wrap.  This will trace calls made by the 
loaded EFI binary (vmlinuz) similar to strace in userspace.

If you see the trace reach the point of calling ExitBootServices(), then 
that shows iPXE has managed to load and start the kernel binary, that 
the kernel has managed to retrieve everything it needed from the 
firmware, and that the firmware part of boot is finished.  This is a 
good sign.

You'll need to remove DEBUG=efi_wrap to get any further, since efi_wrap 
itself will prevent the kernel from booting (as it has no way to unhook 
its tracing mechanism).

In the problem I was seeing, the failure occurred in nii_shutdown(), at 
the point that iPXE tried to shut down the underlying UNDI driver.  The 
PXE_OPCODE_SHUTDOWN call simply never returned.  I have not yet tracked 
down the underlying root cause for this.


On a separate note, you will also need to add "initrd=initrd64.img" to 
your kernel command line, to let the kernel's EFI stub know where to 
find the initrd image.

Michael



More information about the ipxe-devel mailing list