From ceccca1413c0870849e549010a33946adef1818e Mon Sep 17 00:00:00 2001 From: Ingo Meyer Date: Thu, 21 Jul 2022 17:35:56 +0200 Subject: [PATCH] Fix the boot process for Legacy BIOS machines GitHub PR #235 adds an advanced boot mechanism for UEFI machines which causes old Legacy BIOS nodes to hit the 3 GB RAM barrier in 32 Bit iPXE very quickly. Therefore, detect if an EFI or Legacy BIOS is loaded and fall back to the old boot path in the second case. This commit fixes GitHub issue #497. --- etc/ipxe/default.ipxe | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/etc/ipxe/default.ipxe b/etc/ipxe/default.ipxe index 279f2295..0786a0e4 100644 --- a/etc/ipxe/default.ipxe +++ b/etc/ipxe/default.ipxe @@ -19,6 +19,15 @@ echo Warewulf Controller: {{.Ipaddr}} echo Downloading Kernel Image: kernel --name kernel ${uri_base}&stage=kernel || goto reboot +# imgextract causes RAM space problems on non-EFI systems (because of the 3GB barrier +# in 32-Bit mode). +# -> Use the old initrd method with a compressed image to save as much RAM as possible +# in this early boot stage. +# See for more details. +iseq ${platform} efi && goto efi || goto noefi + +:efi + # try extracting compressed images first # NOTE: system overlay tends to be the smallest, so failure here is the cheapest echo Downloading Container Image: @@ -56,6 +65,27 @@ echo Downloading Kernel Modules: initrd --name kmods ${uri_base}&stage=kmods || goto reboot {{- end}} +goto imoktogo + +:noefi + +echo +echo Use legacy initrd mode with compressed images + +echo Downloading Container Image: +initrd --name container ${uri_base}&stage=container&compress=gz || goto reboot + +echo Downloading System Overlay: +initrd --name system ${uri_base}&stage=system&compress=gz || goto reboot + +echo Downloading Runtime Overlay: +initrd --name runtime ${uri_base}&stage=runtime&compress=gz || goto reboot + +{{if ne .KernelOverride "" -}} +echo Downloading Kernel Modules: +initrd --name kmods ${uri_base}&stage=kmods&compress=gz || goto reboot +{{- end}} + :imoktogo