How do I automate network installation of many Ubuntu 18.04 systems with EFI and PXE?

In the past I’ve managed the installation of dozens of Ubuntu 18.04 servers with PXE boot and pxelinux. This worked well, as each system had its own file named after the mac address of the interface that would talk DHCP/PXE. These files would then point to their respective preseed URLs to get the installation going.

Our newer machines only do EFI booting. There is a http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/uefi/grub2-amd64/current/grubnetx64.efi that can perform the same role, except it doesn’t look up the individual machine’s files anymore; it just calls for a common grub.cfg.

I’ve looked at the CentOS7 grub-x86_64.efi which does follow the old method of MAC address based lookups, but unfortunately this version is unable to boot Ubuntu install kernels (basically it hangs after loading the kernel and initrd).

How do I set it up so I can install all my machines automatically?

Go to Source
Author: Dennis van Dok