Skip to content

Commit

Permalink
Merge pull request warewulf#1291 from epruesse/grub-assekey-patch
Browse files Browse the repository at this point in the history
Fix grub asset key handling
  • Loading branch information
mslacken authored Sep 16, 2024
2 parents bffbbde + 3576b1d commit 7f6f717
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
on unused/unmanaged network interfaces.
- Systems with no SMBIOS (Raspberry Pi) will create a UUID from
`/sys/firmware/devicetree/base/serial-number`
- Grub chainload and main configs correctly extract smbios asset key
for node authentication
- Replace slice in templates with sprig substr. #1093
- Fix an invalid format issue for the GitHub nightly build action. #1258
- Return non-zero exit code on overlay build failure #1393
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
* Tobias Ribizel <mail@ribizel.de>
* Tobias Poschwatta <poschwatta@zib.de>
* Josh Burks <jeburks2@asu.edu>
* Elmar Pruessee <pruessee@njhealth.org>
* Elmar Pruesse <pruessee@njhealth.org> @epruesse
5 changes: 3 additions & 2 deletions etc/grub/chainload.ww
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
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"
conf="(http,{{.Ipaddr}}:{{.Warewulf.Port}})/efiboot/grub.cfg?assetkey=${assetkey}"
configfile $conf
}
menuentry "Chainload shim of container" {
shim="(http,{{.Ipaddr}}:{{.Warewulf.Port}})/efiboot/shim.efi"
shim="(http,{{.Ipaddr}}:{{.Warewulf.Port}})/efiboot/shim.efi?assetkey=${assetkey}"
chainloader ${shim}
}
menuentry "UEFI Firmware Settings" --id "uefi-firmware" {
Expand Down
4 changes: 2 additions & 2 deletions etc/grub/grub.cfg.ww
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo
echo "Warewulf Controller: {{.Ipaddr}}"
echo
sleep 1
smbios --type1 --get-string 8 --set assetkey
smbios --type 3 --get-string 8 --set assetkey

uri="(http,{{.Ipaddr}}:{{.Port}})/provision/${net_default_mac}?assetkey=${assetkey}"
kernel="${uri}&stage=kernel"
Expand Down Expand Up @@ -70,7 +70,7 @@ menuentry "Network boot node with dracut: {{.Id}}" --id dracut {
}

menuentry "Chainload specific configfile" {
conf="(http,{{.Ipaddr}}:{{.Port}})/efiboot/grub.cfg"
conf="(http,{{.Ipaddr}}:{{.Port}})/efiboot/grub.cfg?assetkey=${assetkey}"
configfile $conf
}

Expand Down

0 comments on commit 7f6f717

Please sign in to comment.