iPXE discussion forum

Full Version: iPXE can't boot UEFI mode via USB key
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I was trying to follow these commands from https://gist.github.com/AdrianKoshka/5b6...2f8034539a to create a UEFI bootable key with iPXE:

git clone git://git.ipxe.org/ipxe.git
cd ipxe/src
make bin-x86_64-efi/ipxe.usb
sudo dd if=bin-x86_64-efi/ipxe.usb of=/dev/sdX

I'm sure that the machine I tested disabled secure boot and turn UEFI mode on, but I got the weird errors after booting up:

...
Fetching Netboot Image
Malformed binary after Attribute Certificate Table
datasize: ? SumOfBytesHashed: ? SecDir->Size: ?
hashsize: ? SecDir->VirtualAddress: 0x002E6088
Failed to load image: Invalid Parameter
start_image() returned Invalid Parameter
Could not boot image: Error 0x7f048282 (http://ipxe.org/7f048282)

The full screenshot:
[Image: 8TeB2PE.jpg]
https://imgur.com/a/NOloSCU

Then I search the forum to see if any related topic but apparently not...
I just wonder if someone verifies iPXE UEFI with USB key rather than chainloading, becoz my purpose is to use iPXE to replace PXE on the machines without PXE support.

Btw, I confirm iPXE works well with legacy BIOS however I need UEFI mode.

Anyone can give suggestion or information?

Thanks,
Woodrow
To me it seems that what you are having issues with is bootx64.efi which is loaded from iPXE.
iPXE seems to be working just fine.

To have any chance of helping here we need to know what bootx64.efi is.
Which bootx64.efi are you using (from what distro)? Bootx64.efi is, in almost all cases, with current Linux Distros, redundant and actually a less-reliable option.

From your screenshot, iPXE has booted and you have a microkernel which can fetch URIs/ Scripts/ Binaries.

If you want a menu checkout the iPXE "Menu" Feature rather than muddling along trying to get GRUB/GRUB2 URIs to work (they are tied to TFTP URIs or ///FILE: paths).

You might try embedding a script into the image to give yourself a "Micro OS" to give you a Menu and Installation/Boot options depending on your end goals.
Hi all,

The bootx64.efi is provided from the maas server (https://launchpad.net/maas) and I think your comments gave me the good direction to figure out the real problem.

Thank you.
(2018-09-28 10:14)woodrowshen Wrote: [ -> ]The bootx64.efi is provided from the maas server (https://launchpad.net/maas) and I think your comments gave me the good direction to figure out the real problem.

Thank you.

Please let us know what you find... Finding posts online that says "fixed it" without explaining the fix is among the worst things that exists.
Hi,

After roughly digging the maas side, what I know is bootx64 (shimx64.efi) from maas may have some unexpected situations to cause iPXE message "Could not boot image". If I use a simple script:

Code:
#!ipxe

dhcp
chain tftp://xxx.xxx.xxx.xxx/grubx64.efi

Then the iPXE can work fine with maas. Maybe seems like to workaround the bootx64.efi but looks good to me now./
Reference URL's