Saturday, July 07, 2012

Creating bootable ESXi 5.0.0 Update 1 USB install media in Linux

VMware is weird company. They provide only Windows based management tools, but yet installing their products requires manual fiddling with Linux. Notes below are based on info from http://www.r71.nl/kb/technical/327-install-vsphere5-esxi-from-usb.



If you're greeted with "MBR FA:" error on boot it means you forgot to make partition on USB stick active.



# Get required tools (Ubuntu 12.04)
apt-get -y install mbr syslinux

# Figure out what device your USB stick is, in example below it's /dev/sdd
# In case your OS automounted it make sure you unmount it first
umount /dev/sdd1

# Create single partition with type 0x0c "W95 FAT32 (LBA)"
# Make partition active
fdisk /dev/sdd

# Create new FAT32 filesystem
mkfs.vfat -F 32 -n USB /dev/sdd1

# Install syslinux and mbr
syslinux /dev/sdd1
install-mbr /dev/sdd

# Download VMware-VMvisor-Installer-5.0.0.update01-623860.x86_64.iso and save to /usr/src/esx
mkdir -p /usr/src/esx/cd
mkdir -p /usr/src/esx/usb
cd /usr/src/esx

# Mount ISO and USB
mount -o loop VMware-VMvisor-Installer-5.0.0.update01-623860.x86_64.iso cd
mount /dev/sdd1 usb

# Copy installer to usb
cp -avf cd/* usb/

# Generate patched syslinux.cfg from original isolinux.cfg
sed -e's/^DEFAULT.*/DEFAULT install/g' -e's/boot.cfg/boot.cfg -p1/g' <usb/isolinux.cfg >usb/syslinux.cfg

# Unmount ISO and USB
umount cd
umount usb

No comments:

Post a Comment

Got something to say?!