2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-21 08:33:20 +00:00

fix(esx): stage esxboot-x64.efi from the install media if missing

UEFI ESXi netboot needs esxboot-x64.efi under /xcat. When it was not
already staged, mkcommonboot left it missing; copy it from the install media's
efi/boot/bootx64.efi if that exists and the target does not.

Additive and ESXi-only (esx.pm mkcommonboot): it only copies when the target is
absent and the source is present. The original commit also dropped a
"bootmode ne install" guard whose own comment warns the installer croaks; that
hunk is intentionally left out.

Not lab-validated (no ESXi provisioning environment available).

Recovered from the unmerged lenovobuild branch (6931200d, esxboot hunk only).
This commit is contained in:
Vinícius Ferrão
2026-07-23 19:31:52 -03:00
parent cf44f51463
commit dc1472ff3c
+5
View File
@@ -5010,6 +5010,11 @@ sub mkcommonboot {
xCAT::SvrUtils::sendmsg([ 1, "Please run copycds first for $osver or create custom image in $custprofpath/" ], $output_handler);
}
# If the ESXi UEFI boot loader was not staged, copy it from the install media
if (not -r "$tftpdir/xcat/esxboot-x64.efi" and -r "$installroot/$osver/$arch/efi/boot/bootx64.efi") {
copy("$installroot/$osver/$arch/efi/boot/bootx64.efi", "$tftpdir/xcat/esxboot-x64.efi");
}
my @reqmods = qw/vmkboot.gz vmk.gz sys.vgz cim.vgz/; #Required modules for an image to be considered complete
if (-r "$custprofpath/b.z") { #if someone hand extracts from imagedd, a different name scheme is used
@reqmods = qw/b.z k.z s.z c.z/;