Skip to content

Instantly share code, notes, and snippets.

@nielsvanderbeke
Last active June 7, 2022 22:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save nielsvanderbeke/ebedba688c8acc52ff76 to your computer and use it in GitHub Desktop.
Save nielsvanderbeke/ebedba688c8acc52ff76 to your computer and use it in GitHub Desktop.
VMware install ISO on USB
# partition a single msdos partition and make it active:
$ cat /tmp/sdb.save
# partition table of /dev/sdb
unit: sectors
/dev/sdb1 : start= 2048, size= 30272704, Id= c, bootable
/dev/sdb2 : start= 0, size= 0, Id= 0
/dev/sdb3 : start= 0, size= 0, Id= 0
/dev/sdb4 : start= 0, size= 0, Id= 0
# format with FAT32
/sbin/mkfs.vfat -F 32 -n USB /dev/sdb1
# get a compatible version of syslinux (v4.x won't work)
mkdir syslinux
cd syslinux/
wget https://www.kernel.org/pub/linux/utils/boot/syslinux/3.xx/syslinux-3.86.tar.gz
tar zxvfp syslinux-3.86.tar.gz
cd syslinux-3.86
yum -y install nasm
make
# add syslinux mbr
~/syslinux/syslinux-3.86/linux/syslinux /dev/sdb1
cat ~/syslinux/syslinux-3.86/mbr/mbr.bin > /dev/sdb
# mount iso and usb
mkdir /tmp/usb
mount /dev/sdb1 /tmp/usb
mkdir /tmp/iso
mount -o loop /mnt/hgfs/sjj/Downloads/VMware-VMvisor-Installer-5.5.0.update02-2068190.x86_64.iso /tmp/iso
# Copy iso image to usb
cp -r /tmp/iso/* /tmp/usb
mv /tmp/usb/isolinux.cfg /tmp/usb/syslinux.cfg
sed -i 's/^\(.*APPEND -c boot.cfg\)/\1 -p 1/' /tmp/usb/syslinux.cfg
umount /tmp/usb
umount /tmp/iso
@maaarghk
Copy link

maaarghk commented Jul 3, 2018

For anyone wondering this is still the correct process as of esxi 6.7 as seen here - I don't know why that guide mentions syslinux 6 as you clearly require version 3.86.

I would add that there is no reason to call apt install nasm, or yum install nasm, or make because the tar.gz already contains compiled binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment