From aaaf4e3ea823f5bc7dd70702914f4aa77497562b Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Tue, 17 Nov 2026 23:07:02 +0100 Subject: [PATCH 1/2] Install the HTTP boot iPXE shim on every osdeploy initialize run The shim copy ran after the early exit of initialize, so -p, -k, -l or -g on their own did not install it. It also checked for the aarch64 shim as ipxe-aarch64-shim.efi, a name it never writes, so it copied that one on every run instead of only when it was missing. --- confluent_server/bin/osdeploy | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/confluent_server/bin/osdeploy b/confluent_server/bin/osdeploy index 578d2c0a..71847c38 100644 --- a/confluent_server/bin/osdeploy +++ b/confluent_server/bin/osdeploy @@ -423,6 +423,14 @@ async def initialize(cmdset): initialize_genesis('aarch64') if cmdset.r: didsomething = True + if not os.path.exists('/var/lib/confluent/public/ipxe/x86_64/ipxe-shim.efi') and os.path.exists('/opt/confluent/lib/ipxe/ipxe-shim.efi'): + os.makedirs('/var/lib/confluent/public/ipxe/x86_64', exist_ok=True) + shutil.copy('/opt/confluent/lib/ipxe/ipxe-shim.efi', '/var/lib/confluent/public/ipxe/x86_64/ipxe-shim.efi') + shutil.copy('/opt/confluent/lib/ipxe/ipxe.efi', '/var/lib/confluent/public/ipxe/x86_64/ipxe.efi') + if not os.path.exists('/var/lib/confluent/public/ipxe/aarch64/ipxe-shim.efi') and os.path.exists('/opt/confluent/lib/ipxe/ipxe-aarch64-shim.efi'): + os.makedirs('/var/lib/confluent/public/ipxe/aarch64', exist_ok=True) + shutil.copy('/opt/confluent/lib/ipxe/ipxe-aarch64-shim.efi', '/var/lib/confluent/public/ipxe/aarch64/ipxe-shim.efi') + shutil.copy('/opt/confluent/lib/ipxe/ipxe-aarch64.efi', '/var/lib/confluent/public/ipxe/aarch64/ipxe.efi') if not didsomething and (cmdset.k or cmdset.l or cmdset.g or cmdset.p): if cmdset.g: if os.path.exists('/var/lib/confluent/public/os/genesis-x86_64'): @@ -434,14 +442,6 @@ async def initialize(cmdset): sys.stderr.write('Nothing was done, use initialize -i for ' 'interactive mode, or see initialize -h for more options\n') sys.exit(1) - if not os.path.exists('/var/lib/confluent/public/ipxe/x86_64/ipxe-shim.efi') and os.path.exists('/opt/confluent/lib/ipxe/ipxe-shim.efi'): - os.makedirs('/var/lib/confluent/public/ipxe/x86_64', exist_ok=True) - shutil.copy('/opt/confluent/lib/ipxe/ipxe-shim.efi', '/var/lib/confluent/public/ipxe/x86_64/ipxe-shim.efi') - shutil.copy('/opt/confluent/lib/ipxe/ipxe.efi', '/var/lib/confluent/public/ipxe/x86_64/ipxe.efi') - if not os.path.exists('/var/lib/confluent/public/ipxe/aarch64/ipxe-aarch64-shim.efi') and os.path.exists('/opt/confluent/lib/ipxe/ipxe-aarch64-shim.efi'): - os.makedirs('/var/lib/confluent/public/ipxe/aarch64', exist_ok=True) - shutil.copy('/opt/confluent/lib/ipxe/ipxe-aarch64-shim.efi', '/var/lib/confluent/public/ipxe/aarch64/ipxe-shim.efi') - shutil.copy('/opt/confluent/lib/ipxe/ipxe-aarch64.efi', '/var/lib/confluent/public/ipxe/aarch64/ipxe.efi') tmpname = '/var/lib/confluent/public/site/initramfs.cpio.' for x in bytearray(os.urandom(22)): tmpname += fnamechars[x >> 2] From cf98bf1ef98677ecdf1f3cb22620b2efc956aabe Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Tue, 17 Nov 2026 23:03:02 +0100 Subject: [PATCH 2/2] Refresh the HTTP boot iPXE shim when confluent_ipxe is updated A package update replaced only the copies in /opt/confluent/lib/ipxe, so an upgraded server kept serving no shim, or an old one, until osdeploy initialize ran again. A fresh install still gets the shim from osdeploy initialize, before which the public tree may not exist. --- ipxe/confluent_ipxe.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ipxe/confluent_ipxe.spec b/ipxe/confluent_ipxe.spec index 01ded551..1ade6799 100644 --- a/ipxe/confluent_ipxe.spec +++ b/ipxe/confluent_ipxe.spec @@ -1,6 +1,6 @@ Name: confluent_ipxe Version: 2.0.0 -Release: 1 +Release: 2 Summary: iPXE network boot roms for confluent License: GPL @@ -32,7 +32,17 @@ cp arm64-sb/snponly.efi %{buildroot}/opt/confluent/lib/ipxe/ipxe-aarch64.efi /opt/confluent/lib/ipxe/ipxe-aarch64-shim.efi /opt/confluent/lib/ipxe/ipxe-aarch64.efi - +%post +# UEFI HTTP boot chainloads the shim from the public tree. A fresh install +# leaves it to osdeploy initialize, so public keeps the ownership the +# server gives it. +if [ -d /var/lib/confluent/public ]; then + mkdir -p /var/lib/confluent/public/ipxe/x86_64 /var/lib/confluent/public/ipxe/aarch64 + cp /opt/confluent/lib/ipxe/ipxe-shim.efi /opt/confluent/lib/ipxe/ipxe.efi /var/lib/confluent/public/ipxe/x86_64/ + cp /opt/confluent/lib/ipxe/ipxe-aarch64-shim.efi /var/lib/confluent/public/ipxe/aarch64/ipxe-shim.efi + cp /opt/confluent/lib/ipxe/ipxe-aarch64.efi /var/lib/confluent/public/ipxe/aarch64/ipxe.efi +fi +true %changelog