From 6d2418aaa7b2215d756a59edf4fc2ee0ec526e86 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Mon, 9 Nov 2026 10:30:36 -0300 Subject: [PATCH] fix(xcat-core): a UEFI node set to boot its disk stops at the firmware boot menu After the IPv6 diskful install on xcat88-cn, the node netbooted iPXE, which fetched nodes/seqdisc1.uefi and ran its "exit". OVMF loaded BootManagerMenuApp, and the node waited at "Please select boot device" until the case timed out. UEFI firmware that runs a boot option which returns success stops at its boot manager menu and does not try the next option. iPXE "exit" returns success. _write_uefi_exit_script in xnba.pm, which the ipxe method also uses, now writes "exit 1", so the firmware goes on to the disk. The BIOS script keeps "exit". netboot_ipxe_method.t fails without this change; xnba_semicolon.t is updated to the new script. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-server/lib/xcat/plugins/xnba.pm | 4 +++- xCAT-test/unit/xnba_semicolon.t | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index d9668cfa1e..3d3b917dea 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -400,7 +400,9 @@ sub _write_uefi_exit_script { open(my $ucfg, '>', "$bootloader_root/$node.uefi"); print $ucfg "#!gpxe\n"; print $ucfg "#$state\n" if $state; - print $ucfg "exit\n"; + # UEFI firmware stops at its boot manager menu when a boot option returns success. A + # failure status makes it try the next boot option, which is the disk. + print $ucfg "exit 1\n"; close($ucfg); } diff --git a/xCAT-test/unit/xnba_semicolon.t b/xCAT-test/unit/xnba_semicolon.t index fcbc39b951..b0203aca5b 100644 --- a/xCAT-test/unit/xnba_semicolon.t +++ b/xCAT-test/unit/xnba_semicolon.t @@ -106,7 +106,7 @@ for my $case ( 'elilo retains the command line'); } nodeset($node, 'boot', {}); - is(script("$node.uefi"), "#!gpxe\n#boot\nexit\n", 'local boot replaces stale UEFI install content'); + is(script("$node.uefi"), "#!gpxe\n#boot\nexit 1\n", 'local boot replaces stale UEFI install content'); nodeset($node, 'offline', {}); ok(!-e "$root/tftp/xcat/xnba/nodes/$node", 'offline removes BIOS script'); ok(!-e "$root/tftp/xcat/xnba/nodes/$node.uefi", 'offline removes UEFI script');