iPXE scripts for home lab
apt install build-essential
apt build-dep ipxe
mkdir /srv/tftp
git clone https://github.com/ipxe/ipxe.git
cd ipxe
cat >src/config/local/general.h <<'EOF'
#define CERT_CMD
#define DOWNLOAD_PROTO_HTTPS
#define IMAGE_TRUST_CMD
EOF
make -j $(($(getconf _NPROCESSORS_ONLN) + 2)) -C src bin/undionly.kpxe bin-x86_64-efi/ipxe.efi
cp src/bin/undionly.kpxe src/bin-x86_64-efi/ipxe.efi ../
apt install dnsmasq
dhcp-boot=undionly.kpxe
dhcp-match=set:efi-x86_64,option:client-arch,7
dhcp-boot=tag:efi-x86_64,ipxe.efi
dhcp-match=set:ipxe,175 # iPXE sends a 175 option.
dhcp-boot=tag:ipxe,https://boot.yoshihisa.link/boot.ipxe
enable-tftp
tftp-root=/srv/tftp