Setting up VMWare ESXi 5.0 installer on a USB memory stick

I’ve found a couple of ways of doing this with Ubuntu, the quickest way is to make use of the isohybrid tool from the syslinux project.

Download the latest version of the ESXi 5.0 install iso, and then use the following command in a terminal to convert the VMware install CD to a hybrid CD:

isohybrid VMware-VMvisor-Installer-5.0.0.iso

Then write the converted image onto a memory stick just as would a normal disk image with dd by using this command in a terminal:

sudo dd if=VMware-VMvisor-Installer-5.0.0.iso of=/dev/sdX bs=1M

There is also a way to unpack the ISO onto a memory stick and make it bootable, but it’s a little bit more long winded.

iPXE, scripts and initrds

You have always been able to build iPXE with a custom script by compiling it to the ipxe binary like this:

cd /path/to/ipxe/source
make EMBED=myscript.ipxe

However recently Micheal Brown added a great new feature to iPXE, you can now load a script as an initrd. Being able to load a script dynamically opens up some interesting new possibilities and certainly makes updating my utility memory stick much easier.

I’ve made a really basic 16MB bootable disk image, for people who just want to start out simply with the iPXE scripting. The image has the latest version of iPXE and syslinux installed and ready to go. Once you have written it to a memory stick with dd or winimage there is a simple ipxe script called script.ipxe that you can edit.

I use a more slightly more complex setup that allows me to hook iPXE into my general utility memory stick that boots with syslinux. I have added iPXE and so far only a script that allows me to boot over the network from an iSCSI disk with a Ubuntu system on. I’ve broken the syslinux config up on the memory stick to make it easier to read and maintain.

This line to added to my general syslinux menu shows the iPXE menu

include ipxe/ipxe.cfg

In the syslinux/ipxe folder of my memory stick there are four files:

ipxe.krn – this is the actual iPXE binary

ipxe.cfg – this is a simple syslinux config fragment that I use the include directive in the main syslinux menu to load.

label ipxe
  menu label iPXE loading a script
  kernel ipxe/ipxe.krn
  append initrd=ipxe/iscsi.pxe

iscsi.pxe – a basic iSCSI boot script for ipxe. This is just an example, there is much more possible with ipxe scripting.

set keep-san 1
sanboot iscsi:<iscsi disk id> – a quick bash script to update ipxe to the latest git version as well as compiling and copying it to the right place.


cd $src
git pull
make bin/ipxe.lkrn
cp $src/bin/ipxe.lkrn $pwd/ipxe.krn

I have rolled up a tarball of the files and uploaded it here as well: iPXE files for syslinux