VMware
1 2 3 ... 7 Previous Next 96 Replies Last post: Nov 16, 2009 6:54 AM by lzhao  

HOWTO: Installing ESX Server from a USB flash drive posted: Mar 10, 2007 8:15 PM

Click to view Paul Lalonde's profile Master 767 posts since
Jan 16, 2006
After Mike Laverick posted his experience with ESX Server and USB flash disks in another thread, I decided to figure out how to make it work.

Here's a quick rundown on setting up a USB flash disk (ie. pen drive, flash key, etc.) to install ESX Server.

Requirements:

- You'll need SYSLINUX, a Linux boot loader for removable media. Get it here:

http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.36.zip

- These instructions are based on a Windows PC for simplicity. If you're a Linux guru, 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:

1. Plug in your USB flash disk and format it under Windows. Use the FAT filesystem (not FAT32, although it would probably work).


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 program of choice, extract the contents of the boot.iso file to your USB flash drive. On my PC, it's the E: drive.


4. Delete the isolinux.bin and updatecd.cfg files from the USB flash 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. Now, extract the syslinux .zip file into another temporary directory on your hard drive.


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


cd 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 e:

( On my PC, my USB flash drive is mounted as drive E: )


10. Finally, copy the ESX 3.x ISO image onto the flash drive:


copy c:\iso\esx-3.0.1-32039.iso e:\


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-3.0.1-32039.iso


12. You're all set! Unplug the USB flash drive, configure the BIOS on your server to boot from USB accordingly, and boot 'er up!


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 flash 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.


16. The rest is history!


Please let me know how this works for you and if you run into any glitches. This is going to save me a lot of time since I don't have CD-ROM drives in all of my servers!!

Paul
Click to view MichaelJKnight's profile Hot Shot 239 posts since
Nov 3, 2004
Paul,

Excellent post, I assume I could also embed a series of ks.cfg files onto the USB key and modify the syslinux.cfg to have entries to auto build a suite of ESX servers.

Now of to find my USB key ;-)

Michael.
Click to view Mike_Laverick's profile Virtuoso 4,064 posts since
Jan 5, 2004
My thoughts precisely Michael.

Thanks a billion Paul for this - do you mind if I reference this for the book?

FYI... I've been working with PXE appliance that will deploy ESX - the only interaction required is an ILO and F12... comes with a menu. It will be in the book as well - although I plan to release the getting-started guide to it on RTFM... the original developer wants to add some ESX 3.x functionality - so we can create kickstart file using a wizard (which hopefully be better than VMware's...) and the option to hard-code scripts by MAC address for additional security...

My interest in this USB key is related to this as well...

Anyway, thanks once again -

regards
mike

ps thought it was best to thank you hear than extend a Windows Vs Linux flame on the other thread!!!! :-)
Click to view oreeh's profile Guru 9,872 posts since
Nov 30, 2005
Thanks Paul !

Another post for a possible howto section in these forums.

@Mike: I don't want to start a Linux vs Windows flame war.
Click to view Jae Ellers's profile Master 1,097 posts since
Feb 6, 2004
Paul, you rock. Have you gotten any job offers based on the work you've done on this board? You have put out some amazing work.

Thanks.
Click to view Mike_Laverick's profile Virtuoso 4,064 posts since
Jan 5, 2004
Well, i gave that shot... got so far, but hit a road block. This might be down to my type of pen drive - which one of those SanDisk types which appears to have a protected/hidden 5MB CD-ROM style partition somewhere before the Pen drive itself which holds the software for the pen drive itself...

The HP DL385 G1 boots from the pen drive just fine. But when I get to the point where I would select the ISO file. What I actually get is:

/dev/sda1
/dev/sda2
/dev/sda3
/dev/sda4

This is on a server with a single LUN which I wiped especially for this test. I don't see a /dev/sdb - and although I've tried /dev/sdb and variants on this theme it doesn't seem to be finding the pen drive after booting from it...

I have a feeling it might be the SanCruiser. Might buy another 1GB stick that is more vanilla and try again...

Regards
Mike
Click to view tarrysingh's profile Hot Shot 204 posts since
Feb 26, 2005
Fine job, Paul!
Click to view tbrown's profile Enthusiast 107 posts since
Jul 7, 2004
I successfully setup ESX on my Verbatim memory key.

For reference I used:

http://www.verbatim.com/products/product_detail.cfm?product_id=927B2C1D-65B0-5A0F-8394C58CF9A7751E&pc_parent=FlashMedia

Now to setup my KS files.
Click to view grad's profile Lurker 4 posts since
Feb 18, 2005
Getting error message:

C:\testesx\test\win32>syslinux -s e:
Reading boot sector: The parameter is incorrect.

what is wrong?

making usb disk under windows 2003 standard R2 release
Click to view Jwoods's profile Expert 574 posts since
Jul 14, 2005
OMG Paul this is excellent. I've been trying to get this working off and on for quite awhile now. Thanks a million! You deserve 50 points for this!
Click to view grad's profile Lurker 4 posts since
Feb 18, 2005
Yep , when i look in diskmanagement it's FAT
Click to view Schorschi's profile Expert 743 posts since
Jul 6, 2005
Ok, this is fine, did this months ago, but I could not get past one key issue, anaconda has an issue with finding the ks.cfg file that is on the flash source. I could never get a ks.cfg to complete correctly using this method.
1 2 3 ... 7 Previous Next Go to original post

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities