Short answer: You can put the rEFInd boot manager on a FAT32 USB stick as EFI/BOOT/bootx64.efi, copy the ESXi 9.0 ISO into a subfolder, and add one menuentry per host that loads the ESXi UEFI bootloader with a different ks=usb:/... Kickstart file. One stick then installs many hosts unattended. This is a lab technique described by William Lam. It is not a Broadcom-supported installation method.
When a custom ESXi boot menu helps
A USB stick with one embedded Kickstart file installs exactly one host configuration. For a homelab or a small VCF test bed with three or four hosts, you would otherwise rebuild the stick for each host or set up PXE/HTTP boot. A UEFI boot menu lets you pick the host (and, if you want, the ESXi version) at boot time, with no network dependency.
It only works with UEFI. Broadcom KB 84233 explains that legacy BIOS support is being removed from vSphere and that vSphere 8.0 drops it for new server platforms. If your host still boots in legacy mode, switch it to UEFI first.
USB layout
| Path on USB | Content |
|---|---|
/EFI/BOOT/bootx64.efi | refind_x64.efi from the rEFInd package, renamed |
/EFI/BOOT/refind.conf | Menu definition |
/esx9/ | Full contents of the ESXi 9.0 ISO |
/kickstart/ | One Kickstart file per host, file names in UPPERCASE |
Step by step
- Format the stick with an MBR partition table and a single FAT32 partition. On macOS, for example:
diskutil partitionDisk /dev/diskN 1 MBRFormat "MS-DOS" VCF R(check the disk number first, because this erases it). - Create
EFI/BOOT,esx9andkickstarton the stick. - Extract the ESXi 9.0 ISO into
esx9/. - Edit
esx9/EFI/BOOT/BOOT.CFG(details below). - Download rEFInd from its official site and copy
refind_x64.efitoEFI/BOOT/bootx64.efi. - Write
EFI/BOOT/refind.confand copy your Kickstart files tokickstart/.
Why boot.cfg must change
The ESXi boot.cfg on the ISO lists modules with absolute paths such as /jumpstrt.gz, which assume the installer sits at the root of the media. According to the boot.cfg reference, prefix= is prepended only to paths that do not start with /. So you need to do both of these:
- set
prefix=/esx9/ - remove the leading
/fromkernel=and from every entry inmodules=
Edit only those two things and keep the module list from your own ISO. The result is that the ESXi bootloader, started from /esx9/efi/boot/bootx64.efi, finds its kernel and modules under /esx9/ and not at the root of the stick.
refind.conf
timeout 30
textonly
scanfor manual
showtools shell, reboot
menuentry "ESXi 9.0 - esx01" {
loader /esx9/efi/boot/bootx64.efi
options "ks=usb:/kickstart/KS-ESX01.CFG"
}
menuentry "ESXi 9.0 - esx02" {
loader /esx9/efi/boot/bootx64.efi
options "ks=usb:/kickstart/KS-ESX02.CFG"
}
scanfor manual tells rEFInd to show only your stanzas and not auto-detected loaders. The syntax is described in the rEFInd configuration docs. The options string is handed to the ESXi UEFI bootloader as boot options, just like options typed after Shift+O at the ESXi boot prompt. To offer several ESXi versions, extract each ISO into its own folder (esx9, esx91, and so on), each with its own prefix, and point extra menu entries at them.
Caveats
- Unsupported: the vSphere documentation (Create a USB Flash Drive to Store the ESX Installation Script) says not to store the Kickstart file on the same USB flash drive that boots the installer. This setup does exactly that. It works in labs, but for production use a supported method such as a separate USB drive, CD-ROM, or HTTP/PXE Kickstart.
- Secure Boot: rEFInd’s own documentation covers the Secure Boot options (shim or your own keys). In a lab, the simplest approach is to disable Secure Boot for the install.
- The original post notes that Kickstart file names must be UPPERCASE for
ks=usb:to find them. - Make sure the
installtarget in each Kickstart file matches that host’s boot disk. A wrong--firstdiskor--diskvalue wipes the wrong device.
After installation, the esxcli command reference helps with verifying the host config. The minimal VCF 9.0 lab post shows where multi-host Kickstart pays off.
Further reading
- William Lam: Custom UEFI Boot Menu for ESXi 9.0 using rEFInd (original post)
- Broadcom TechDocs: About the boot.cfg File (ESX 9.0)
- rEFInd: Configuring the Boot Manager