Here is a config I use for PXE booting both UEFI and legacy BIOS clients at the same time.
This is the GRUB variant; for the previous version I used see the pxelinux
branch.
The main config is in boot/grub/grub.cfg
- Run
./make.sh
on Ubuntu to copy the required files from system packages - Set up a TFTP server to serve files from the
./tftp
directory - Set up a HTTP server to serve files from the
./tftp
directory (because TFTP is horribly slow, and you would need to load the initrd over it otherwise, which is ~100MB on recent Ubuntu releases) - Set up an NFS server to serve files from the
./tftp/disks
directory (you may be able to get by with just HTTP in newer releases of Ubuntu if you have enough RAM to fit the entire ISO) - Set up a DHCP server to provide correct config file depending on the type of the client. See
dnsmasq.conf
for raw dnsmasq, oretc_config_network
for OpenWRT - Configure
boot/grub/grub.cfg
to your needs. An example of booting Ubuntu 20.04.3 Installer/Live CD is provided.