From dc1472ff3cd86be3ae91ce4192c880f51a85f38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Thu, 23 Jul 2026 19:31:52 -0300 Subject: [PATCH] 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). --- xCAT-server/lib/xcat/plugins/esx.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 151611f96..305cdb5f2 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -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/;