Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iPXE can't boot UEFI mode via USB key
2018-09-26, 07:30 (This post was last modified: 2018-09-26 16:48 by NiKiZe.)
Post: #1
iPXE can't boot UEFI mode via USB key
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
Find all posts by this user
Quote this message in a reply
2018-09-26, 16:50
Post: #2
RE: iPXE can't boot UEFI mode via USB key
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.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2018-09-26, 20:28
Post: #3
bootx64.efi
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.

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
2018-09-28, 10:14
Post: #4
RE: iPXE can't boot UEFI mode via USB key
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.
Find all posts by this user
Quote this message in a reply
2018-09-28, 20:42
Post: #5
RE: iPXE can't boot UEFI mode via USB key
(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.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2018-10-01, 07:56
Post: #6
RE: iPXE can't boot UEFI mode via USB key
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./
Find all posts by this user
Quote this message in a reply
2018-12-07, 07:30
Post: #7
RE: iPXE can't boot UEFI mode via USB key
@woodrowshen Pardon my noobness to ipxe and pxe in general. I'm trying to do the opposite. I created a ipxe bootable usb image using make ipxe.efi and I am stuck trying to configure my pxe server to load uefi pxe images. Reading your thread, if I create a ipxe.usb image then I would be able to PXE boot using the legacy method?

The reason I'm using ipxe is because my new servers do not have a 1G onboard port to do pxe booting so I needed to use a usb ethernet dongle and the BIOS does not support this at this time. iPXE enables the usb ethernet dongle so it can be used to pxe, but I originally got a message saying that pxelinux.0 could not boot because of an exec format error. I researched and found that since I used efi boot image that I now need to use efi method to pxe. I'm trying to set up my pxe to boot efi but just haven't been able to get the right bits. I get a unable to fetch tftp image when using bootx64.efi. After reading your thread, it gives me hope that I can return back to using the legacy method.

My PXE server is running ubuntu and I'm trying to load CentOS on the client servers.

Thanks. Really appreciate any hints...again sorry if my message makes no sense due to my noobness.
Find all posts by this user
Quote this message in a reply
2018-12-07, 23:06
Post: #8
RE: iPXE can't boot UEFI mode via USB key
(2018-12-07 07:30)daferret Wrote:  @woodrowshen Pardon my noobness to ipxe and pxe in general. I'm trying to do the opposite. I created a ipxe bootable usb image using make ipxe.efi and I am stuck trying to configure my pxe server to load uefi pxe images. Reading your thread, if I create a ipxe.usb image then I would be able to PXE boot using the legacy method?

The reason I'm using ipxe is because my new servers do not have a 1G onboard port to do pxe booting so I needed to use a usb ethernet dongle and the BIOS does not support this at this time. iPXE enables the usb ethernet dongle so it can be used to pxe, but I originally got a message saying that pxelinux.0 could not boot because of an exec format error. I researched and found that since I used efi boot image that I now need to use efi method to pxe. I'm trying to set up my pxe to boot efi but just haven't been able to get the right bits. I get a unable to fetch tftp image when using bootx64.efi. After reading your thread, it gives me hope that I can return back to using the legacy method.

My PXE server is running ubuntu and I'm trying to load CentOS on the client servers.

Thanks. Really appreciate any hints...again sorry if my message makes no sense due to my noobness.

You can not boot legacy code in efi mode, and you can not boot efi code in legacy mode.
You need to run the correct mode all the way - always!

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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