From 7704e6149b1d0c91d19651215aeee7399a9b8c93 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 15 Dec 2021 17:13:11 -0500 Subject: [PATCH] Fix boot.ipxe name and add host-ipxe template --- buildpxe.sh | 2 +- templates/{boot.pxe => boot.ipxe} | 2 +- templates/host-ipxe.j2 | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) rename templates/{boot.pxe => boot.ipxe} (89%) create mode 100644 templates/host-ipxe.j2 diff --git a/buildpxe.sh b/buildpxe.sh index 53784fd..038e2b2 100755 --- a/buildpxe.sh +++ b/buildpxe.sh @@ -121,7 +121,7 @@ build_pxe() { echo "done." echo -n "Copying base iPXE configuration... " - cp templates/boot.pxe ${outputdir}/boot.pxe + cp templates/boot.ipxe ${outputdir}/boot.ipxe echo "done." echo -n "Copying preseed template... " diff --git a/templates/boot.pxe b/templates/boot.ipxe similarity index 89% rename from templates/boot.pxe rename to templates/boot.ipxe index 33a5756..78cfd38 100644 --- a/templates/boot.pxe +++ b/templates/boot.ipxe @@ -9,7 +9,7 @@ set initrd initrd.img set imgargs-base vga=normal nomodeset boot=live components ethdevice-timeout=300 timezone=America/Toronto fetch=${root-url}/filesystem.squashfs username=root set imgargs-pvcinstall pvcinstall.preseed=on pvcinstall.seed_host=${next-server} pvcinstall.seed_file=/host/mac-${mac:hexraw}.preseed -# Load per-host kernel command line parameters (should contain ${imgargs-host} if present) +# Load per-host kernel command line parameters chain --autofree ${root-url}/host/mac-${mac:hexraw}.ipxe || # Set default menu options diff --git a/templates/host-ipxe.j2 b/templates/host-ipxe.j2 new file mode 100644 index 0000000..13deec6 --- /dev/null +++ b/templates/host-ipxe.j2 @@ -0,0 +1,5 @@ +#!ipxe + +{% if imgargs_host is defined and imgargs_host %} +set imgargs-host {{ imgargs_host }} +{% endif %}