PXE Server provides a DHCP server with support PXE and network boot, TFTP server and HTTP server (only send static files).
Avalible loaders:
- SYSLINUX (bios, efi)
- IPXE (bios, efi)
- SHIM_GRUB2 (bios, efi with secure boot)
- UEFI_HTTP (efi-only, not tested on real hardware)
- Rewrite hard-coded dhcp boot filename for support user configuration
- Download prepared wwwroot
- Download minilinux and extract to wwwroot
- Change loader config:
- syslinux: pxelinux.cfg\default
- ipxe: boot.ipxe (it is text script)
- SHIM GRUB2: grub\grub.cfg
- EFI HTTP: set url to loader (example: http://192.168.1.100:80/shimx64.efi)
- Configure PXE (pxe.conf)
- Run server
Tested only on Windows 10 x64.
Test EFI x64 boot:
- Install TAP-Windows
- Install QEMU
- Download OVMF EDK2
- Run QEMU
qemu-system-x86_64.exe ^
-M q35 ^
-cpu max ^
-m 512M ^
-bios RELEASEX64_OVMF.fd ^
-netdev tap,id=mynet0,ifname=<TAP interface name> -device e1000,netdev=mynet0
Test PXE BIOS boot:
- Install VirtualBox
- Create new VM and select network boot.
- Enjoy!
Check your firewall and open ports:
- UDP: 67, 69
- TCP: 80
On Windows:
netsh advfirewall firewall add rule name="PXE DHCP" dir=in action=allow protocol=UDP localport=67
netsh advfirewall firewall add rule name="PXE DHCP" dir=out action=allow protocol=UDP localport=67
netsh advfirewall firewall add rule name="PXE TFTP" dir=in action=allow protocol=UDP localport=69
netsh advfirewall firewall add rule name="PXE TFTP" dir=out action=allow protocol=UDP localport=69
netsh advfirewall firewall add rule name="PXE HTTP" dir=in action=allow protocol=TCP localport=80
netsh advfirewall firewall add rule name="PXE HTTP" dir=out action=allow protocol=TCP localport=80
-
How create grub2 pxe loader:
grub-mkimage -d /usr/lib/grub/i386-pc/ -O i386-pc-pxe -p "(pxe)/grub" -o grub2.pxe pxe tftp pxechain boot http linux
-
How work shim? Shim not work on http. I use signed shim from ubuntu 20.04. Its pre-compiled with hard-coded filename "grubx64.efi". So I can't set http path. Only work with tftp.
-
Memdisk not work in EFI.
-
Grub loopback can't loop ISO over HTTP :)
-
IPXE sometimes slow downloading over HTTP (maybe bug?)
This project is licensed under the MIT License - see the LICENSE file for details