[GH-ISSUE #383] Exec format error with uefi on packet.com server #149

Closed
opened 2026-02-27 14:50:35 +03:00 by kerem · 2 comments
Owner

Originally created by @mikemrm on GitHub (Nov 5, 2019).
Original GitHub issue: https://github.com/netbootxyz/netboot.xyz/issues/383

Originally assigned to: @antonym on GitHub.

Hello,

On a packet.com server that boots in EFI mode, I'm receiving an error Could not boot: Exec format error It seems the following code is statically pointing to a .kpxe (legacy image)

github.com/antonym/netboot.xyz@39f4303790/src/boot.cfg (L118-L124)

This was replicated using a c2.medium.x86 with the Custom iPXE os with the url pointing to https://boot.netboot.xyz

Here is the full console output

>>Start PXE over IPv4.
  Station IP address is 139.178.85.118

  Server IP address is 139.178.81.6
  NBP filename is ipxe.efi
  NBP filesize is 994592 Bytes
 Downloading NBP file...

  Succeed to download NBP file.
iPXE initialising devices...ok



iPXE 1.0.255+(3fe683e) -- Open Source Network Boot Firmware -- http://ipxe.org
Features: DNS HTTP HTTPS iSCSI TFTP SRP VLAN AoE EFI Menu

net0: 98:03:9b:2f:3b:16 using ConnectX-4Lx on 0000:01:00.0 (open)
  [Link:up, TX:0 TXE:0 RX:0 RXE:0]
Configuring (net0 98:03:9b:2f:3b:16).................. ok
net0: 139.178.85.118/255.255.255.252 gw 139.178.85.117
net0: fe80::9a03:9bff:fe2f:3b16/64
net1: fe80::9a03:9bff:fe2f:3b17/64 (inaccessible)
Next server: 139.178.81.6
Filename: http://139.178.81.6/auto.ipxe
http://139.178.81.6/auto.ipxe... ok
auto.ipxe : 364 bytes [script]
Packet.net Baremetal - iPXE boot
http://139.178.81.6/phone-home... ok
https://boot.netboot.xyz.... ok           
https://boot.netboot.xyz/menu.ipxe... ok
boot.cfg... ok

Updated version of netboot.xyz is available:

Running version.....1.0.255+(3fe683e)
Updated version.....1.04

Please download the latest version from netboot.xyz.

Attempting to chain to latest version...
http://boot.netboot.xyz/ipxe/netboot.xyz-packet.kpxe... ok
Could not boot: Exec format error (http://ipxe.org/2e008081)

I was able to get around this problem by chain loading the netboot.xyz.efi image first.

#!ipxe

chain --autofree https://boot.netboot.xyz/ipxe/netboot.xyz.efi

Here is the console output with this process

Booting from PXE Device 1: NIC in Slot 2 Port 1

>>Start PXE over IPv4.
  Station IP address is 139.178.85.118

  Server IP address is 139.178.81.6
  NBP filename is ipxe.efi
  NBP filesize is 994592 Bytes
 Downloading NBP file...

  Succeed to download NBP file.
iPXE initialising devices...ok



iPXE 1.0.255+(3fe683e) -- Open Source Network Boot Firmware -- http://ipxe.org
Features: DNS HTTP HTTPS iSCSI TFTP SRP VLAN AoE EFI Menu

net0: 98:03:9b:2f:3b:16 using ConnectX-4Lx on 0000:01:00.0 (open)
  [Link:up, TX:0 TXE:0 RX:0 RXE:0]
Configuring (net0 98:03:9b:2f:3b:16).................. ok
net0: 139.178.85.118/255.255.255.252 gw 139.178.85.117
net0: fe80::9a03:9bff:fe2f:3b16/64
net1: fe80::9a03:9bff:fe2f:3b17/64 (inaccessible)
Next server: 139.178.81.6
Filename: http://139.178.81.6/auto.ipxe
http://139.178.81.6/auto.ipxe... ok
auto.ipxe : 388 bytes [script]
Packet.net Baremetal - iPXE boot
http://139.178.81.6/phone-home... ok
https://not.local.domain/force-efi-netboot.xyz.ipxe............... ok                     
https://boot.netboot.xyz/ipxe/netboot.xyz.efi... ok
iPXE initialising devices...ok



iPXE 1.0.0+ (3fe6) -- Open Source Network Boot Firmware -- http://ipxe.org
Features: DNS HTTP HTTPS iSCSI TFTP SRP VLAN AoE EFI Menu
netboot.xyz v1.04
                                      
Configuring (net0 98:03:9b:2f:3b:16).................. ok
https://boot.netboot.xyz/menu.ipxe... ok
boot.cfg... ok

 (truncated)

                                  netboot.xyz

 (truncated) (Go through menu and select CentOS 8 Graphical)

http://mirror.centos.org/centos/8.0.1905/BaseOS/x86_64/os/images/pxeboot/vmlinuz... ok 
http://mirror.centos.org/centos/8.0.1905/BaseOS/x86_64/os/images/pxeboot/initrd.img... ok 

MD5sums:
eb269219ff2a7668c2c76b44a9b9f1bd  vmlinuz
a1a0426518f65df9a71edbf5cdbdf7d8  initrd.img

Checking signatures...
http://boot.netboot.xyz/sigs/centos/8.0.1905/BaseOS/x86_64/os/images/pxeboot/vmlinuz.sig... ok
http://boot.netboot.xyz/sigs/centos/8.0.1905/BaseOS/x86_64/os/images/pxeboot/initrd.img.sig... ok
Signatures verified!

It seems the ${platform} variable can be used to detect whether or not the server is in uefi mode.
http://ipxe.org/cfg/platform

I hope this information helps. Let me know if I can provide any additional information.

Originally created by @mikemrm on GitHub (Nov 5, 2019). Original GitHub issue: https://github.com/netbootxyz/netboot.xyz/issues/383 Originally assigned to: @antonym on GitHub. Hello, On a packet.com server that boots in EFI mode, I'm receiving an error `Could not boot: Exec format error` It seems the following code is statically pointing to a `.kpxe` (legacy image) https://github.com/antonym/netboot.xyz/blob/39f4303790bb8f43a151dd6a43088dfabc0da773/src/boot.cfg#L118-L124 This was replicated using a `c2.medium.x86` with the `Custom iPXE` os with the url pointing to `https://boot.netboot.xyz` Here is the full console output ``` >>Start PXE over IPv4. Station IP address is 139.178.85.118 Server IP address is 139.178.81.6 NBP filename is ipxe.efi NBP filesize is 994592 Bytes Downloading NBP file... Succeed to download NBP file. iPXE initialising devices...ok iPXE 1.0.255+(3fe683e) -- Open Source Network Boot Firmware -- http://ipxe.org Features: DNS HTTP HTTPS iSCSI TFTP SRP VLAN AoE EFI Menu net0: 98:03:9b:2f:3b:16 using ConnectX-4Lx on 0000:01:00.0 (open) [Link:up, TX:0 TXE:0 RX:0 RXE:0] Configuring (net0 98:03:9b:2f:3b:16).................. ok net0: 139.178.85.118/255.255.255.252 gw 139.178.85.117 net0: fe80::9a03:9bff:fe2f:3b16/64 net1: fe80::9a03:9bff:fe2f:3b17/64 (inaccessible) Next server: 139.178.81.6 Filename: http://139.178.81.6/auto.ipxe http://139.178.81.6/auto.ipxe... ok auto.ipxe : 364 bytes [script] Packet.net Baremetal - iPXE boot http://139.178.81.6/phone-home... ok https://boot.netboot.xyz.... ok https://boot.netboot.xyz/menu.ipxe... ok boot.cfg... ok Updated version of netboot.xyz is available: Running version.....1.0.255+(3fe683e) Updated version.....1.04 Please download the latest version from netboot.xyz. Attempting to chain to latest version... http://boot.netboot.xyz/ipxe/netboot.xyz-packet.kpxe... ok Could not boot: Exec format error (http://ipxe.org/2e008081) ``` I was able to get around this problem by chain loading the `netboot.xyz.efi` image first. ``` #!ipxe chain --autofree https://boot.netboot.xyz/ipxe/netboot.xyz.efi ``` Here is the console output with this process ``` Booting from PXE Device 1: NIC in Slot 2 Port 1 >>Start PXE over IPv4. Station IP address is 139.178.85.118 Server IP address is 139.178.81.6 NBP filename is ipxe.efi NBP filesize is 994592 Bytes Downloading NBP file... Succeed to download NBP file. iPXE initialising devices...ok iPXE 1.0.255+(3fe683e) -- Open Source Network Boot Firmware -- http://ipxe.org Features: DNS HTTP HTTPS iSCSI TFTP SRP VLAN AoE EFI Menu net0: 98:03:9b:2f:3b:16 using ConnectX-4Lx on 0000:01:00.0 (open) [Link:up, TX:0 TXE:0 RX:0 RXE:0] Configuring (net0 98:03:9b:2f:3b:16).................. ok net0: 139.178.85.118/255.255.255.252 gw 139.178.85.117 net0: fe80::9a03:9bff:fe2f:3b16/64 net1: fe80::9a03:9bff:fe2f:3b17/64 (inaccessible) Next server: 139.178.81.6 Filename: http://139.178.81.6/auto.ipxe http://139.178.81.6/auto.ipxe... ok auto.ipxe : 388 bytes [script] Packet.net Baremetal - iPXE boot http://139.178.81.6/phone-home... ok https://not.local.domain/force-efi-netboot.xyz.ipxe............... ok https://boot.netboot.xyz/ipxe/netboot.xyz.efi... ok iPXE initialising devices...ok iPXE 1.0.0+ (3fe6) -- Open Source Network Boot Firmware -- http://ipxe.org Features: DNS HTTP HTTPS iSCSI TFTP SRP VLAN AoE EFI Menu netboot.xyz v1.04 Configuring (net0 98:03:9b:2f:3b:16).................. ok https://boot.netboot.xyz/menu.ipxe... ok boot.cfg... ok (truncated) netboot.xyz (truncated) (Go through menu and select CentOS 8 Graphical) http://mirror.centos.org/centos/8.0.1905/BaseOS/x86_64/os/images/pxeboot/vmlinuz... ok http://mirror.centos.org/centos/8.0.1905/BaseOS/x86_64/os/images/pxeboot/initrd.img... ok MD5sums: eb269219ff2a7668c2c76b44a9b9f1bd vmlinuz a1a0426518f65df9a71edbf5cdbdf7d8 initrd.img Checking signatures... http://boot.netboot.xyz/sigs/centos/8.0.1905/BaseOS/x86_64/os/images/pxeboot/vmlinuz.sig... ok http://boot.netboot.xyz/sigs/centos/8.0.1905/BaseOS/x86_64/os/images/pxeboot/initrd.img.sig... ok Signatures verified! ``` It seems the `${platform}` variable can be used to detect whether or not the server is in uefi mode. http://ipxe.org/cfg/platform I hope this information helps. Let me know if I can provide any additional information.
kerem 2026-02-27 14:50:35 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@antonym commented on GitHub (Nov 6, 2019):

Feel free to give it a try once the packet.efi image is built(probably about 10 min from now) and let me know if that helps things out.

Thanks!

<!-- gh-comment-id:550084363 --> @antonym commented on GitHub (Nov 6, 2019): Feel free to give it a try once the packet.efi image is built(probably about 10 min from now) and let me know if that helps things out. Thanks!
Author
Owner

@mikemrm commented on GitHub (Nov 6, 2019):

Seems to be working! Thanks!

<!-- gh-comment-id:550304036 --> @mikemrm commented on GitHub (Nov 6, 2019): Seems to be working! Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/netboot.xyz#149
No description provided.