[syslinux] UEFI bootable USB stick to allow PXE booting with USB ethernet adaptors?

Frantisek Rysanek Frantisek.Rysanek at post.cz
Thu Jul 20 03:17:16 PDT 2023


On 20 Jul 2023 at 8:31, Dan Jackson via Syslinux wrote:
>
> Hello,
> 
> At my workplace we have some laptops that don't have a built in
> Ethernet adaptor and don't natively support PXE booting using a USB
> Ethernet adaptor. 
> 
> Is it possible to create a UEFI bootable USB stick with Syslinux that
> can somehow kickstart the PXE boot process using the USB Ethernet
> adaptor? If so, how would we do that? 
> 
> Unfortunately due to the nature of the boot image, simply writing the
> boot image to a USB stick and trying to boot off that does not work,
> we specifically need to PXE boot it. 
> 
> Thanks,
> Dan Jackson (Network & Systems Engineer)
> Long Road Sixth Form College
> Cambridge, UK
> 

Hello Dan,

Syslinux has been unmaintained for a while, and the early EFI support 
in Syslinux has never quite worked for me.
I'm saying this as a long-time fond user of ISOLINUX and PXELINUX 
(and occasionally Syslinux as well).

That said, there is iPXE, which has the following advantages for your 
scenario:

1) iPXE possibly could be obtained in the form of an EFI payload 
(EFI-loadable binary), or as a USB stick image:
https://ipxe.org/download
If you don't like the original USB stick image by iPXE, you could try 
to build your own, the format of the disk for EFI booting isn't very 
complicated - or perhaps take a look at rEFInd the "EFI boot manager" 
and use that to chainload the iPXE.EFI binary...

2) iPXE contains or can contain drivers for many typical Ethernet 
adapter chips (NIC's) on the PCI(-e) bus. Looking at the source code 
at Github, I can see promising signs that iPXE itself contains 
drivers for USB EHCI and XHCI, and a generic driver for CDC-ECM (USB 
Ethernet device class). Note that USB Ethernet has had years of 
history behind it, and you may need to try several different dongles 
(USB Ethernet chips) until you find one that works with iPXE.

If you manage to get as far as seeing the iPXE loading on your PC, 
drop me a line by direct e-mail, I could help with an initial menu 
script. Chainloading an iPXE stage from the LAN could also be an 
option, although I'm not sure if I've ever tried...

Note that if your PC machines do not support legacy BIOS boot, i.e. 
don't have the "CSM", i.e. the UEFI "firmware" does not provide 
legacy BIOS services, you won't be able to chainload anything 
legacy-bootable = start a diskless DOS, chainload PXElinux or some 
such.
In UEFI mode, from iPXE or rEFInd, you have a theoretical chance to 
start or chainload things that use the UEFI interfaces to talk to 
disk / network / kb+mouse / VGA. 
That is, namely: modern Windows-PE or Linux. And possibly from there 
you can run DOS-era disk cloning tools under emulation (QEMU in 
Linux).

Speaking of networking, I do worry a little that if your "UEFI 
firmware" (in the ROM on the motherboard) does not contain support 
for PXE/network booting, you will be limited to the iPXE instance 
loaded from USB, and this instance will already need to contain 
config of where to load the "OS" (kernel+initrd, or a UEFI-compatible 
image of a Windows-PE boot CD).
Or, you could possibly chainload iPXE from the LAN, and this iPXE 
image loaded from the LAN would also need to contain its own driver 
for your USB Ethernet dongle...

If you have an existing PXE-booting environment (probably in legacy 
BIOS/PXE mode), there is a way for the DHCP server (I use ISC dhcpd) 
to distinguish between legacy vs. UEFI PXE clients, and serve a 
corresponding flavour of the PXE boot loader.

Again, further details are available via private e-mail.
It's a bit of a learning curve...

Frank



More information about the Syslinux mailing list