Install ESX from a USB drive

Recently I needed to install multiple ESX servers by CD, the CD’s kept getting lost and scratched, I wondered if there was a way to install from USB, surely this would be faster too.

I looked through the forums and found a couple of people that had managed it, I have amended there instructions slightly to get this working….

Requirements

You will need SYSLINUX, a Linux boot loader for removable media.

This can be downloaded here: http://www.kernel.org/pub/linux/utils/boot/syslinux/


These instructions are based on a Windows PC for my simplicity.

If you're a Linux guru (you know who I’m talking about!), then you can obviously do this under Linux. You'd need to know how to mount .ISO images in order to extract files, etc.

Steps Required

Throughout this example my USB hard drive was I: replace this with your letter.


1.  Plug in your USB flash disk and format it in dos using the following command: FORMAT I: /FS:FAT

2.  From Windows Explorer, find the boot.iso file in the /images directory on the ESX 3.x CD-ROM. Copy boot.iso into a temporary directory on your hard drive.

3.  Using your ISO extraction or mount program, extract the contents of the boot.iso file to your USB flash drive.

4.  Delete the isolinux.bin and updatecd.cfg files from the USB disk.

5.  Rename the isolinux.cfg file on the USB flash disk to syslinux.cfg

6.  Using WordPad (not Notepad), open the syslinux.cfg file and add the keyword usb to the end of every line that begins with append. Here's what the file should look like when you're done:

default esx

prompt 1

timeout 600

display boot.msg

F1 boot.msg

F7 snake.msg

label debug

  kernel vmlinuz

  append initrd=initrd.img noapic nomediacheck debug usb

label esx

  kernel vmlinuz

  append initrd=initrd.img usb

label text

  kernel vmlinuz

  append initrd=initrd.img text usb

label expert

  kernel vmlinuz

  append expert initrd=initrd.img usb

label ks

  kernel vmlinuz

  append ks initrd=initrd.img usb

label lowres

  kernel vmlinuz

  append initrd=initrd.img lowres usb

7.   Extract the syslinux.zip file into another temporary directory on your hard drive.

8.  Open up a command prompt and navigate into the win32 directory. For example:

C:\temp\syslinux-3.36\win32

9.   Now, run the syslinux program to apply the boot loader and boot sector to the USB flash drive:

syslinux -s –ma I:

10.   Copy the ESX 3.x ISO image onto the USB drive root
 
11.   Confirm that your USB flash drive contains the following files:

boot.cat

boot.msg

initrd.img

snake.msg

splash.lss

vmlinuz

syslinux.cfg

esx-X.iso

12.   Your ready to go, ensure your bios on the server you want to install too is setup to boot from USB or select USB from the alternate boot menu.

13.   The ESX installer will detect the USB device and whatever SCSI / disk controllers you have. When the installer asks you what the installation source will be, choose Hard Disk.

14.   You will need to choose the right disk device (ie. /dev/sda, /dev/sdb) that corresponds to your USB disk. Chances are it will be /dev/sdb.

15.   Finally, the installer will ask you what directory to find the ESX installation CD image in. Just use / and it will find the .ISO image for you.

That’s everything, my servers managed to install in around 4 minutes which is not bad really!  I have now modified my 4GB USB drive to include other tools like Knoppix and a dos boot disk all amendable from the main menu with not too much work.  I might blog how to do these on another day.

6 thoughts on “Install ESX from a USB drive

  1. veeru

    I am getting the error while installing ESX 4.0 from USB “system could not find the Kernal Image” and stucks at “boot”

  2. mark

    @Virtu-Al
    No problem. Thanks for the write-up on the page. One thing I forgot, I did not have a cd (so no boot.iso file), but just extracted everything from:

    VMware-VMvisor-Installer-4.0.0.164009.x86_64.iso

    which I downloaded from VMware’s website.

  3. Virtu-Al

    @mark
    Nice one, I will have to run through that and add a new post, thanks very much for doing this.

  4. mark

    I got this method to work on ESXi 4.0 by slightly modifying your method. Here were the changes I made:

    4. Updatecd.cfg is not in the ESXi 4.0 install ISO and is not needed.
    5. Only had to add “usb” to one append line in syslinux.cfg
    6. Final list of needed files is different.

    This also keeps VMware’s new menu boot intact. 🙂

  5. Anonymous

    This is very cool especially since I used ESX 3.5 and not ESXi. One question though; how can I get my automated build script integrated into this? Before, I used to boot off a USB key that pointed to the ESX source files on an IIS webserver. So I guess, how do I invoke my script with your solution above?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.