Configure destination of grub.cfg at overlay render time

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-10-29 20:41:05 -06:00
parent be97ef15a0
commit 40f0cebe64
4 changed files with 17 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
{{ file (print .Tftp.TftpRoot "/warewulf/grub.cfg") }}
# This file is autogenerated by warewulf
# Host: {{ .BuildHost }}
# Time: {{ .BuildTime }}
# Source: {{ .BuildSource }}
echo "================================================================================"
echo "Warewulf v4 now iXPE booting with grub"
echo "================================================================================"
smbios --type 3 --get-string 8 --set assetkey
set timeout=2
# Must chainload in order to get kernel args for specific node
menuentry "Load specific configfile" {
conf="(http,{{.Ipaddr}}:{{.Warewulf.Port}})/efiboot/grub.cfg?assetkey=${assetkey}"
configfile $conf
}
menuentry "Chainload shim from image" {
shim="(http,{{.Ipaddr}}:{{.Warewulf.Port}})/efiboot/shim.efi?assetkey=${assetkey}"
chainloader ${shim}
}
menuentry "UEFI Firmware Settings" --id "uefi-firmware" {
fwsetup
}
menuentry "System restart" {
echo "System rebooting..."
reboot
}
menuentry "System shutdown" {
echo "System shutting down..."
halt
}