From 7a63e517f74242662fb44ecd0f3e65af5d10f255 Mon Sep 17 00:00:00 2001 From: xu yang Date: Tue, 22 Oct 2024 07:49:52 +0000 Subject: [PATCH 1/4] fix issue that initrd fails at downloading runtime overlay with permission denied error, when warewulf secure option in warewulf.conf is enabled Signed-off-by: xu yang --- CHANGELOG.md | 2 ++ etc/ipxe/default.ipxe | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 999525ca..595fb424 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,6 +96,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Don't update IPMI if password isn't set. #638 - Fix issue that `--nettagdel` does not work properly. #1503 - Fix test for dhcp static configuration #1536 #1537 +- Fix issue that initrd fails at downloading runtime overlay with permission denied error, + when warewulf secure option in warewulf.conf is enabled. #806 ## v4.5.8, 2024-10-01 diff --git a/etc/ipxe/default.ipxe b/etc/ipxe/default.ipxe index 10ed5ff2..b66b6f5c 100644 --- a/etc/ipxe/default.ipxe +++ b/etc/ipxe/default.ipxe @@ -58,7 +58,7 @@ echo Downloading System Overlay: initrd --name system ${uri_base}&stage=system || goto reboot echo Downloading Runtime Overlay: -initrd --name runtime ${uri_base}&stage=runtime || goto reboot +initrd --name runtime ${uri_base}&stage=runtime || echo Failed to download overlay runtime, but will continue... {{if ne .KernelOverride "" -}} echo Downloading Kernel Modules: @@ -79,7 +79,7 @@ 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 +initrd --name runtime ${uri_base}&stage=runtime&compress=gz || echo Failed to download overlay runtime.gz, but will continue... {{if ne .KernelOverride "" -}} echo Downloading Kernel Modules: From 7b1adf4c1253411813b9f6b1c22efa60e555db9a Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Fri, 25 Oct 2024 15:17:33 -0600 Subject: [PATCH 2/4] Simplified CHANGELOG and iPXE error messages Signed-off-by: Jonathon Anderson --- CHANGELOG.md | 1 + etc/ipxe/default.ipxe | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 595fb424..30031ae7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,6 +98,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix test for dhcp static configuration #1536 #1537 - Fix issue that initrd fails at downloading runtime overlay with permission denied error, when warewulf secure option in warewulf.conf is enabled. #806 +- Allow iPXE to continue booting without runtime overlay. #806 ## v4.5.8, 2024-10-01 diff --git a/etc/ipxe/default.ipxe b/etc/ipxe/default.ipxe index b66b6f5c..afe476cb 100644 --- a/etc/ipxe/default.ipxe +++ b/etc/ipxe/default.ipxe @@ -58,7 +58,7 @@ echo Downloading System Overlay: initrd --name system ${uri_base}&stage=system || goto reboot echo Downloading Runtime Overlay: -initrd --name runtime ${uri_base}&stage=runtime || echo Failed to download overlay runtime, but will continue... +initrd --name runtime ${uri_base}&stage=runtime || echo Failed downloading runtime overlay. {{if ne .KernelOverride "" -}} echo Downloading Kernel Modules: @@ -79,7 +79,7 @@ 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 || echo Failed to download overlay runtime.gz, but will continue... +initrd --name runtime ${uri_base}&stage=runtime&compress=gz || echo Failed downloading runtime overlay. {{if ne .KernelOverride "" -}} echo Downloading Kernel Modules: From c6ebac89da3086ff4b28c46e51d24fc13a059966 Mon Sep 17 00:00:00 2001 From: Xu Yang Date: Fri, 8 Nov 2024 03:33:46 +0000 Subject: [PATCH 3/4] add failure downloading runtime message to imgextract part Signed-off-by: Xu Yang --- etc/ipxe/default.ipxe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/ipxe/default.ipxe b/etc/ipxe/default.ipxe index afe476cb..71196c23 100644 --- a/etc/ipxe/default.ipxe +++ b/etc/ipxe/default.ipxe @@ -37,7 +37,7 @@ echo Downloading System Overlay: imgextract --name system ${uri_base}&stage=system&compress=gz || goto reboot echo Downloading Runtime Overlay: -imgextract --name runtime ${uri_base}&stage=runtime&compress=gz || goto reboot +imgextract --name runtime ${uri_base}&stage=runtime&compress=gz || echo Failed downloading runtime overlay. {{if ne .KernelOverride "" -}} echo Downloading Kernel Modules: From cab56fbea5387d498cfada8de9ec06b4ffc5f9db Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Wed, 13 Nov 2024 22:20:26 -0700 Subject: [PATCH 4/4] Omit initrd=runtime if not loaded Signed-off-by: Jonathon Anderson --- etc/ipxe/default.ipxe | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/etc/ipxe/default.ipxe b/etc/ipxe/default.ipxe index 71196c23..fa4ed459 100644 --- a/etc/ipxe/default.ipxe +++ b/etc/ipxe/default.ipxe @@ -37,7 +37,7 @@ echo Downloading System Overlay: imgextract --name system ${uri_base}&stage=system&compress=gz || goto reboot echo Downloading Runtime Overlay: -imgextract --name runtime ${uri_base}&stage=runtime&compress=gz || echo Failed downloading runtime overlay. +imgextract --name runtime ${uri_base}&stage=runtime&compress=gz && set runtime_initrd initrd=runtime || echo Failed downloading runtime overlay. {{if ne .KernelOverride "" -}} echo Downloading Kernel Modules: @@ -58,7 +58,7 @@ echo Downloading System Overlay: initrd --name system ${uri_base}&stage=system || goto reboot echo Downloading Runtime Overlay: -initrd --name runtime ${uri_base}&stage=runtime || echo Failed downloading runtime overlay. +initrd --name runtime ${uri_base}&stage=runtime && set runtime_initrd initrd=runtime || echo Failed downloading runtime overlay. {{if ne .KernelOverride "" -}} echo Downloading Kernel Modules: @@ -79,7 +79,7 @@ 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 || echo Failed downloading runtime overlay. +initrd --name runtime ${uri_base}&stage=runtime&compress=gz && set runtime_initrd initrd=runtime || echo Failed downloading runtime overlay. {{if ne .KernelOverride "" -}} echo Downloading Kernel Modules: @@ -90,11 +90,11 @@ initrd --name kmods ${uri_base}&stage=kmods&compress=gz || goto reboot :imoktogo {{if ne .KernelOverride "" -}} -echo boot kernel initrd=container initrd=kmods initrd=system initrd=runtime wwid={{.Hwaddr}} {{.KernelArgs}} -boot kernel initrd=container initrd=kmods initrd=system initrd=runtime wwid={{.Hwaddr}} {{.KernelArgs}} || goto reboot +echo boot kernel initrd=container initrd=kmods initrd=system ${runtime_initrd} wwid={{.Hwaddr}} {{.KernelArgs}} +boot kernel initrd=container initrd=kmods initrd=system ${runtime_initrd} wwid={{.Hwaddr}} {{.KernelArgs}} || goto reboot {{- else -}} -echo boot kernel initrd=container initrd=system initrd=runtime wwid={{.Hwaddr}} {{.KernelArgs}} -boot kernel initrd=container initrd=system initrd=runtime wwid={{.Hwaddr}} {{.KernelArgs}} || goto reboot +echo boot kernel initrd=container initrd=system ${runtime_initrd} wwid={{.Hwaddr}} {{.KernelArgs}} +boot kernel initrd=container initrd=system ${runtime_initrd} wwid={{.Hwaddr}} {{.KernelArgs}} || goto reboot {{- end}} :reboot