2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-22 18:32:13 +00:00

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>
This commit is contained in:
Daniel Hilst
2026-11-09 10:30:36 -03:00
parent d7aaafc7a0
commit 6d2418aaa7
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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');