Dan Jackson
2023-Jul-20 08:31 UTC
[syslinux] UEFI bootable USB stick to allow PXE booting with USB ethernet adaptors?
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 Thank you for your email which we will respond to as quickly as we can. Please be aware that to support the wellbeing of our staff and students, Long Road Sixth Form College does not routinely respond to emails outside of our usual working hours. -- [https://www.longroad.ac.uk/_site/data/files/images/logos/F077AFDB9FEBB77F977D7E6C09DA751F.png]<https://www.longroad.ac.uk> [https://www.longroad.ac.uk/_site/data/files/images/76DB28695AB2A957B1812BD75CC585E1.png]<https://www.facebook.com/LongRoadSixthFormCollege/> [https://www.longroad.ac.uk/_site/data/files/images/CE703F46CFAF86CA4D3BBF0AB2232A7F.png] <https://twitter.com/LR6FC> [https://www.longroad.ac.uk/_site/data/files/images/3DF251EAAF6B9B15CF4C8EC453B73AFA.png] <https://www.instagram.com/lr6fc/> This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual(s) to whom it is addressed. If you receive this email by mistake please notify the sender and delete it immediately. This communication represents the originator's personal views and opinions which do not necessarily reflect those of Long Road Sixth Form College. Please be aware that any encrypted files emailed to Long Road may be subject to a delay.
Frantisek Rysanek
2023-Jul-20 10:17 UTC
[syslinux] UEFI bootable USB stick to allow PXE booting with USB ethernet adaptors?
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