You can format a USB flash drive to boot the ESXi installation or upgrade.
The instructions in this procedure assume that the USB flash drive is detected as /dev/sdb.
Note: The
ks.cfg file that contains the installation script cannot be located on the same USB flash drive that you are using to boot the installation or upgrade.
Prerequisites
- Linux machine with superuser access to it
- USB flash drive that can be detected by the Linux machine
- The ESXi ISO image, VMware-VMvisor-Installer-version_number-build_number.x86_64.iso, which includes the isolinux.cfg file
- Syslinux package
Procedure
- If your USB flash drive is not detected as /dev/sdb, or you are not sure how your USB flash drive is detected, determine how it is detected.
- At the command line, run the command for displaying the current log messages.
tail -f /var/log/messages
- Plug in your USB flash drive.
You see several messages that identify the USB flash drive in a format similar to the following message.
Oct 25 13:25:23 ubuntu kernel: [ 712.447080] sd 3:0:0:0: [sdb] Attached SCSI removable disk
In this example, sdb identifies the USB device. If your device is identified differently, use that identification, in place of sdb.
- Create a partition table on the USB flash device.
- Enter
d
to delete partitions until they are all deleted.
- Enter
n
to create a primary partition 1 that extends over the entire disk.
- Enter
t
to set the type to an appropriate setting for the FAT32 file system, such as c.
- Enter
a
to set the active flag on partition 1.
- Enter
p
to print the partition table.
The result should be similar to the following message.
Disk /dev/sdb: 2004 MB, 2004877312 bytes
255 heads, 63 sectors/track, 243 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 243 1951866 c W95 FAT32 (LBA)
- Enter
w
to write the partition table and exit the program.
- Format the USB flash drive with the Fat32 file system.
/sbin/mkfs.vfat -F 32 -n USB /dev/sdb1
- Install the Syslinux bootloader on the USB flash drive.
The locations of the Syslinux executable file and the
mbr.bin file might vary for the different Syslinux versions. For example, if you downloaded Syslinux 6.02, run the following commands.
/usr/bin/syslinux /dev/sdb1
cat /usr/lib/syslinux/mbr/mbr.bin > /dev/sdb
- Create a destination directory and mount the USB flash drive to it.
mkdir /usbdisk
mount /dev/sdb1 /usbdisk
- Create a destination directory and mount the ESXi installer ISO image to it.
mkdir /esxi_cdrom
mount -o loop VMware-VMvisor-Installer-6.x.x-XXXXXX.x86_64.iso /esxi_cdrom
- Copy the contents of the ISO image to the USB flash drive.
cp -r /esxi_cdrom/* /usbdisk
- Rename the isolinux.cfg file to syslinux.cfg.
mv /usbdisk/isolinux.cfg /usbdisk/syslinux.cfg
- In the /usbdisk/syslinux.cfg file, edit the
APPEND -c boot.cfg
line to APPEND -c boot.cfg -p 1
.
- Unmount the USB flash drive.
- Unmount the installer ISO image.
Results
The USB flash drive can boot the ESXi installer.