...
When booting in UEFI mode following an ESXi upgrade or install, the system hangs at the boot loader prompt showing the "VMware Hypervisor Recovery" message on the console.
This article provides a method to manually install a UEFI boot loader from an ESXi ISO installer image to recover the system.
ESXi comes with boot loader changes that might be incompatible with some system firmware. In ESXi 7.0u2, the method used to load EFI files was identified to not be supported on affected systems.
This is a known issue affecting VMware ESXi 7.0u2. VMware is aware of this issue and is working to resolve it in a future release.
To work around this issue, copy the bootloader files from an ESXi 7.0u1 ISO image to the boot device of the affected system by following the instructions below: Boot the system using the ESXi 7.0u1 installer ISO image.At the installer dialog, enter the ESXi command-line shell: Press Alt-F1.Log in as root (no password).(Optional) Start the SSH daemon so you can login remotely by issuing the following command: /etc/init.d/SSH start In the ESXi shell, issue the following commands: ## 1. Identify the boot partition, which is the first partition on the boot disk.# The name of the boot disk varies from system to system, but it is the one that includes a boot partition (systemPartition) and 2 bootbanks (linuxNative).#$ ls /dev/disksmpx.vmhba32:C0:T0:L0mpx.vmhba32:C0:T0:L0:1 # <--- boot partitionmpx.vmhba32:C0:T0:L0:5mpx.vmhba32:C0:T0:L0:6mpx.vmhba32:C0:T0:L0:7 $ partedUtil getptbl /dev/disks/mpx.vmhba32:C0:T0:L0gpt1947 255 63 312934401 64 204863 C12A7328F81F11D2BA4B00A0C93EC93B systemPartition 128 # <--- systemPartition is boot5 208896 2306047 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 06 2308096 4405247 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 07 4407296 31293406 4EB2EA3978554790A79EFAE495E21F8D vmfsl 0 ## 2. Prepare FAT copy symlink to mtools (in case they are not there yet).# Ignore warnings about symlinks that already exist.# # Verify if you have mtools or mcopy:$ ls -l /bin/mcopy /bin/mtoolslrwxrwxrwx 1 root root 11 Jan 10 12:22 /bin/mcopy -> /bin/mtools-r-xr-xr-x 1 root root 230840 Jan 10 12:22 /bin/mtools # For a version with only mcopy available, e.g. ESXi 6.x:$ ln -s /bin/mcopy /bin/mdir # For a version with mtools available, e.g. ESXi 7.x:$ ln -s /bin/mtools /bin/mcopy$ ln -s /bin/mtools /bin/mdir## 3. Check the contents of the boot partition to make sure files are where they are expected to be.#$ mdir -i /dev/disks/mpx.vmhba32:C0:T0:L0:1 EFI/BOOT Volume in drive : has no label Volume Serial Number is 5083-2758Directory for ::/EFI/BOOT . <DIR> 2020-04-03 4:59.. <DIR> 2020-04-03 4:59BOOTX64 EFI 98896 2020-12-22 5:18 BOOTx64.EFI 3 files 98 896 bytes 104 073 216 bytes free $ mdir -i /dev/disks/mpx.vmhba32:C0:T0:L0:1 EFI/VMware Volume in drive : has no label Volume Serial Number is 5083-2758Directory for ::/EFI/VMware . <DIR> 2020-04-03 4:59.. <DIR> 2020-04-03 4:59mboot64 efi 167360 2020-12-22 5:18SAFEBO~1 EFI 98896 2020-12-22 5:18 safeboot64.efi 4 files 266 256 bytes 104 073 216 bytes free## 4. Backup boot files.#$ mcopy -i /dev/disks/mpx.vmhba32:C0:T0:L0:1 ::EFI/BOOT/BOOTx64.EFI ::EFI/BOOT/BOOTx64-orig.EFI$ mcopy -i /dev/disks/mpx.vmhba32:C0:T0:L0:1 ::/EFI/VMware/mboot64.efi ::/EFI/VMware/mboot64-orig.efi$ mcopy -i /dev/disks/mpx.vmhba32:C0:T0:L0:1 ::/EFI/VMware/safeboot64.efi ::/EFI/VMware/safeboot64-orig.efi ## 5. Copy the booted version's boot loader to the boot disk.#$ cd /usr/lib/vmware/bootloader-installer$ mcopy -i /dev/disks/mpx.vmhba32:C0:T0:L0:1 safeboot64.efi ::EFI/BOOT/BOOTx64.EFI$ mcopy -i /dev/disks/mpx.vmhba32:C0:T0:L0:1 safeboot64.efi ::/EFI/VMware/safeboot64.efi$ mcopy -i /dev/disks/mpx.vmhba32:C0:T0:L0:1 mboot64.efi ::/EFI/VMware/mboot64.efi## 6. Reboot the system to boot from the disk.