Skip to content

Instantly share code, notes, and snippets.

@sjjohansen
Created October 21, 2014 04:51
Show Gist options
  • Save sjjohansen/df22e2faa2dedaa66ad9 to your computer and use it in GitHub Desktop.
Save sjjohansen/df22e2faa2dedaa66ad9 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment