Can't Seem to PXE Boot (UEFI Network Stack not working)

I’ve been trying for the past hour to network boot, but no matter what I do, it never seems to try…

Even in the EFI Shell, I can’t seem to enable the network:

Shell> ifconfig
IfConfig: Locate protocol error - 'Ip4Config Protocol'

Shell> ipconfig
ipconfig: Locate protocol error - 'Simple network protocol'

devices and devtree both don’t show any network stuff, and drivers presents all the possibly required network drivers. At first I say broken port, but the lights turn on, and if I boot to USB network works fine. So I’m kinda stumped…

I noticed there is UEFI UNDI Driver from realtek, is it useful?

https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software

How would I use it? The device doesn’t seem to be detected at all (until I get to the OS).

Well, I spoke too soon, once in the UEFI shell I loaded it up, and it loaded successfully, but I couldn’t get DHCP to work, it just gave all zeros. That, and:

Shell> ipconifg
MAC Address: 16 1C 8A 1A 3C 03
Broadcast MAC: FF FF FF FF FF FF
ipconfig: Locate protocol error - 'PXE base code protocol'

Interestingly, here there is a defined MAC address, whereas in the OS it’s just 00:00:00:00:03:00.

It seems that the BIOS image is missing a few drivers. Hopefully that’s all it is.

Is this going to be fixed soon, it’s a huge blocker for me…

Please let me know if there is any other info that you want me to provide.

This is also a HUGE potential blocker for me as I intend on building a Kubernetes cluster of Rock Pi Xs using PXE boot.

@jack can you confirm your team is able to PXE boot the Rock Pi X?

Unfortunately PXE booting is not supported in the bios AMI provided to us, this is because the SoC is a mobile SoC and was primarily used for tablets.

Wake on LAN and RTC Wake also do not work on the Rock PI X.

Is this also a limitation of the BIOS? Could it be fixed with a BIOS update or do these two features need a new board revision with a fixed power wiring? (or whatever change is needed on the hardware level)

Thanks

It seems to be solely a BIOS limitation, which is a good thing, because it means that it can be fixed. But the question is, is AMI willing to work with you guys?

Perhaps it would be possible to bundle iPXE in the bios the same way we include a UEFI shell?

For now my workaround is to use iPXE built to bin-x86_64-efi/rtl8168.efi saved to /EFI/BOOT/BOOTX64.EFI (so it’s recognized automatically), but it’s an inelegant solution…

@jack is it possible to bundle an iPXE efi alongside the UEFI shell?

we will check this. it seems possible.

@chabad360 Could you provide some steps how to set it up? I seem to be unable to move the file, at lest in Linux. I have no experience with the UEFI shell.

@jack It would be really nice to have a tutorial on how to set up PXE in the Wiki.

Could you elaborate more on exactly where you’re getting stuck? I would gladly write a detailed guide to setting this up, but I’m rather busy these days, so I can’t really do that. But I can give small bits of advice.

@chabad360 Did you build the bin-x86_64-efi/rtl8168.efi or is this from the link @jack sent? Could you maybe provide a download link or just a pointer to documentation that explains how to build it?

Thanks a lot for the fast reply.

I can make a guide once I get it working.

The iPXE make is smart, by specifying the name of the driver in the file name that’s the driver that will be included in the bootloader.

By specifing make bin-x86_64-efi/rtl8168.efi make will build an x86_64 elf binary with just the driver for the RealTek 8168 (the network card used in the Rock Pi X). This doesn’t require any extra files, only what come with the iPXE source code.

@jack How can people contribute to the documentation?

1 Like

I bought RockPI X to setup a mini cluster and need PXE to deploy at scale. Do you think @jack that there is a way for support of PXE, for example through a BIOS update?

I had a similar issue. My solution was to build a customized iPXE bootloader image with an embed script that fetches the actual boot instructions. This iPXE image was then signed and placed in the EFI system partition on the emmc as ESP/EFI/BOOT/BOOTX64.EFI. I may make a more detailed guide to this at some point in the near future.

1 Like