Update dracut scripts, iPXE template, and GRUB config templates
- Update dracut scripts, iPXE template, and GRUB config templates to use new route paths and TLS-aware logic - Minor troubleshooting doc cleanup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
committed by
Christian Goll
parent
b40c379550
commit
0133a3eb46
@@ -29,8 +29,9 @@ reboot
|
||||
echo "Reading asset key..."
|
||||
smbios --type 3 --get-string 8 --set assetkey
|
||||
|
||||
uri="(http,{{.Authority}})/provision/${net_default_mac}?assetkey=${assetkey}"
|
||||
kernel="${uri}&stage=kernel"
|
||||
base="(http,{{.Authority}})"
|
||||
params="assetkey=${assetkey}"
|
||||
kernel="${base}/kernel/${net_default_mac}?${params}"
|
||||
|
||||
set default={{ or .Tags.GrubMenuEntry "single-stage" }}
|
||||
set timeout=2
|
||||
@@ -64,10 +65,10 @@ menuentry "Single-stage boot" --id single-stage {
|
||||
fi
|
||||
|
||||
echo "Downloading images..."
|
||||
image="${uri}&stage=image&compress=gz"
|
||||
system="${uri}&stage=system&compress=gz"
|
||||
image="${base}/image/${net_default_mac}?${params}&compress=gz"
|
||||
system="${base}/system/${net_default_mac}?${params}&compress=gz"
|
||||
{{- if not (eq .TLS true) }}
|
||||
runtime="${uri}&stage=runtime&compress=gz"
|
||||
runtime="${base}/runtime/${net_default_mac}?${params}&compress=gz"
|
||||
{{- end }}
|
||||
initrd $image $system $runtime
|
||||
if [ $? != 0 ]
|
||||
@@ -113,10 +114,10 @@ menuentry "Single-stage boot (no compression)" --id single-stage-nocompress {
|
||||
fi
|
||||
|
||||
echo "Downloading images..."
|
||||
image="${uri}&stage=image"
|
||||
system="${uri}&stage=system"
|
||||
image="${base}/image/${net_default_mac}?${params}"
|
||||
system="${base}/system/${net_default_mac}?${params}"
|
||||
{{- if not (eq .TLS true) }}
|
||||
runtime="${uri}&stage=runtime"
|
||||
runtime="${base}/runtime/${net_default_mac}?${params}"
|
||||
{{- end }}
|
||||
initrd $image $system $runtime
|
||||
if [ $? != 0 ]
|
||||
@@ -149,11 +150,12 @@ menuentry "Two stage boot with dracut" --id dracut {
|
||||
{{- end }}
|
||||
echo "* KernelArgs: {{.KernelArgs}}"
|
||||
|
||||
initramfs="${uri}&stage=initramfs"
|
||||
initramfs="${base}/initramfs/${net_default_mac}?${params}"
|
||||
|
||||
wwinit_uri="http://{{.Ipaddr}}:{{.Port}}/provision/${net_default_mac}"
|
||||
wwinit_server="http://{{.Ipaddr}}:{{.Port}}"
|
||||
net_args="rd.neednet=1 {{range $devname, $netdev := .NetDevs}}{{if and $netdev.Hwaddr $netdev.Device}} ifname={{$netdev.Device}}:{{$netdev.Hwaddr}} {{end}}{{end}}"
|
||||
wwinit_args="root=wwinit:{{default "tmpfs" .Root}} wwinit.uri=${wwinit_uri} init=/warewulf/run-init"
|
||||
wwinit_args="root=wwinit:{{default "tmpfs" .Root}} wwinit.server=${wwinit_server} wwinit.uri=${wwinit_uri} init=/warewulf/run-init"
|
||||
|
||||
echo
|
||||
echo "Downloading kernel image..."
|
||||
|
||||
@@ -15,11 +15,12 @@ sleep 30
|
||||
reboot
|
||||
{{- end }}
|
||||
|
||||
set baseuri http://{{.Authority}}/provision/{{.Hwaddr}}
|
||||
set uri ${baseuri}?assetkey=${asset}&uuid=${uuid}
|
||||
set base http://{{.Authority}}
|
||||
set hwaddr {{.Hwaddr}}
|
||||
set params assetkey=${asset}&uuid=${uuid}
|
||||
|
||||
echo Downloading kernel image...
|
||||
kernel --name kernel ${uri}&stage=kernel || goto reboot
|
||||
kernel --name kernel ${base}/kernel/${hwaddr}?${params} || goto reboot
|
||||
|
||||
{{- if .Tags.IPXEMenuEntry }}
|
||||
set method {{ .Tags.IPXEMenuEntry }}
|
||||
@@ -43,12 +44,12 @@ goto metadata
|
||||
:imgextract_continue
|
||||
echo
|
||||
echo Downloading compressed image with imgextract...
|
||||
imgextract --name image ${uri}&stage=image&compress=gz || goto error_use_initrd
|
||||
imgextract --name image ${base}/image/${hwaddr}?${params}&compress=gz || goto error_use_initrd
|
||||
echo Downloading compressed system overlay image with imgextract...
|
||||
imgextract --name system ${uri}&stage=system&compress=gz || goto error_reboot
|
||||
imgextract --name system ${base}/system/${hwaddr}?${params}&compress=gz || goto error_reboot
|
||||
{{- if not (eq .TLS true) }}
|
||||
echo Downloading compressed runtime overlay image with imgextract...
|
||||
imgextract --name runtime ${uri}&stage=runtime&compress=gz && set runtime_initrd initrd=runtime || echo Unable to download runtime overlay. (ignored)
|
||||
imgextract --name runtime ${base}/runtime/${hwaddr}?${params}&compress=gz && set runtime_initrd initrd=runtime || echo Unable to download runtime overlay. (ignored)
|
||||
{{- end }}
|
||||
goto boot_single_stage
|
||||
|
||||
@@ -62,12 +63,12 @@ goto metadata
|
||||
:initrd_continue
|
||||
echo
|
||||
echo Downloading compressed image with initrd...
|
||||
initrd --name image ${uri}&stage=image&compress=gz || goto error_reboot
|
||||
initrd --name image ${base}/image/${hwaddr}?${params}&compress=gz || goto error_reboot
|
||||
echo Downloading compressed system overlay with initrd...
|
||||
initrd --name system ${uri}&stage=system&compress=gz || goto error_reboot
|
||||
initrd --name system ${base}/system/${hwaddr}?${params}&compress=gz || goto error_reboot
|
||||
{{- if not (eq .TLS true) }}
|
||||
echo Downloading compressed runtime overlay with initrd...
|
||||
initrd --name runtime ${uri}&stage=runtime&compress=gz && set runtime_initrd initrd=runtime || echo Unable to download runtime overlay. (ignored)
|
||||
initrd --name runtime ${base}/runtime/${hwaddr}?${params}&compress=gz && set runtime_initrd initrd=runtime || echo Unable to download runtime overlay. (ignored)
|
||||
{{- end }}
|
||||
goto boot_single_stage
|
||||
|
||||
@@ -77,12 +78,12 @@ goto metadata
|
||||
:initrd_nocompress_continue
|
||||
echo
|
||||
echo Downloading uncompressed image with initrd...
|
||||
initrd --name image ${uri}&stage=image || goto error_reboot
|
||||
initrd --name image ${base}/image/${hwaddr}?${params} || goto error_reboot
|
||||
echo Downloading uncompressed system overlay with initrd...
|
||||
initrd --name system ${uri}&stage=system || goto error_reboot
|
||||
initrd --name system ${base}/system/${hwaddr}?${params} || goto error_reboot
|
||||
{{- if not (eq .TLS true) }}
|
||||
echo Downloading uncompressed runtime overlay with initrd...
|
||||
initrd --name runtime ${uri}&stage=runtime && set runtime_initrd initrd=runtime || echo Unable to download runtime overlay. (ignored)
|
||||
initrd --name runtime ${base}/runtime/${hwaddr}?${params} && set runtime_initrd initrd=runtime || echo Unable to download runtime overlay. (ignored)
|
||||
{{- end }}
|
||||
goto boot_single_stage
|
||||
|
||||
@@ -92,9 +93,9 @@ goto metadata
|
||||
:dracut_continue
|
||||
echo
|
||||
echo Downloading dracut initramfs...
|
||||
initrd --name initramfs ${uri}&stage=initramfs || goto error_reboot
|
||||
initrd --name initramfs ${base}/initramfs/${hwaddr}?${params} || goto error_reboot
|
||||
set dracut_net rd.neednet=1 {{range $devname, $netdev := .NetDevs}}{{if and $netdev.Hwaddr $netdev.Device}} ifname={{$netdev.Device}}:{{$netdev.Hwaddr}} ip={{$netdev.Device}}:dhcp {{end}}{{end}}
|
||||
set dracut_wwinit root=wwinit:{{default "tmpfs" .Root}} wwinit.uri=${baseuri} init=/warewulf/run-init
|
||||
set dracut_wwinit root=wwinit:{{default "tmpfs" .Root}} wwinit.server=${base} wwinit.uri=${base}/provision/${hwaddr} init=/warewulf/run-init
|
||||
goto boot_two_stage_dracut
|
||||
|
||||
:boot_single_stage
|
||||
|
||||
Reference in New Issue
Block a user