VMware Cloud Community
Paul_Lalonde
Commander
Commander

HOWTO: Installing ESX Server from a USB flash drive

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 will need at least a 1 GB USB flash disk.


\- You must have

both

the ESX 3.x CD-ROM and ISO image handy.


\- You will need an ISO image extraction tool such as WinISO, MagicISO, or even WinRAR.


\- 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 usbto 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</p>

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

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

Reply
0 Kudos
100 Replies
glow-plug
Contributor
Contributor

Great post Gents.

I have been following the instructions in the post and have not had success.

Is it possible to store the "ks.cfg" file on the usb stick and build servers with the CD and usb key?

Currently try to create a standard build for ESX 3.5 (esx-3.5.0-64607).

Reply
0 Kudos
lettech
Enthusiast
Enthusiast

Yeah can do. Boot to the ESX CD, at the grub prompt type (for USB key): esx ks=hd:sda1/ks.cfg method=cdrom (note path to you USB key may differ and not all keys seem to work).

Reply
0 Kudos
Schorschi
Expert
Expert

Actually I have gotten 6 or 7 different vendors that make USB keys to work. It came down to 2 factors, the tool I used to format the key, and making sure I had the right reference to the USB drive, some systems it shows up as sda, or sdb, or even sdc, once in a while something odd. The easiest way I know to find the USB key is to do an OEM install of ESX, with the key plugged in and then during the RPM loading, jump to ALT-F2 and do cat /proc/partitions, looking for the USB device. The one thing I have never got to work, is booting from USB and building from USB, anaconda via the partition python script just gets confused between read-write media and what it expects as read-only media as the source for the ESX source files. Same basic issue that is noted in this thread. We go absolutely no where with VMware on this issue, and with ESXi released, VMware is not motivated to solve the issue. Which I can understand, although I do not agree with the perspective.

Reply
0 Kudos
nergene
Contributor
Contributor

Has anyone had success with using this method for ESX 3.5? I've integrated the pyc script as per SpiderMon's instructions over here, but it's still throwing an unhandled exception at partitioning, similiar to fbedell's on page 2 of this thread. The only other thing that I'm doing different (aside from using 3.5) is using grub as bootloader, which shouldn't matter at this point in the process. Any advice would be very appreciated.

Reply
0 Kudos
bk66md
Contributor
Contributor

bump bump...

anybody have some luck installing 3.5 from usb?

I'm getting the error "...installation tree in that directory does not seem to match your boot media."

thanks!

Reply
0 Kudos
spoonwzd
Contributor
Contributor

third bump's a charm...

Anyone have this working with 3.5 ISO yet?

My server CD-ROM drive is b0rked!

Reply
0 Kudos
dconvery
Champion
Champion

You're probably better off using Ultimate Deployment Appliance -&gt; http://www.rtfm-ed.co.uk/?page_id=366

Or, if you are just doing an upgrade, use the tarball method or the VUM method.

Dave

************************

If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside.

Robert X. Cringely, InfoWorld magazine

Dave Convery, VCDX-DCV #20 ** http://www.tech-tap.com ** http://twitter.com/dconvery ** "Careful. We don't want to learn from this." -Bill Watterson, "Calvin and Hobbes"
Reply
0 Kudos
bk66md
Contributor
Contributor

I ended up using the UDA and installing from pxe boot and ftp.

worked like a charm. I'd still love to know how to get a thumbdrive install to work

Reply
0 Kudos
SGBoys
Contributor
Contributor

Hi, The link for partitions.pyc is dead. Does anyone have an alternative link?

Thanks

Reply
0 Kudos
bigiedoank
Contributor
Contributor

hi....

where can I download partitions.py and hdstg2.img patch?? cause when I try download from http://home.cogeco.ca/~plalonde2/ the site say not found....

thank's :smileygrin:

Reply
0 Kudos
Paul_Lalonde
Commander
Commander

Hi,

My ISP deleted my user directory on their server and all of my VMware-related files are gone. I'll see if I can find them on my home PC. If not, I'll try and recreate the steps for installing ESX 3.5 from USB flash.

Thanks

Paul

Reply
0 Kudos
bigiedoank
Contributor
Contributor

thanks for the responses, ok I wait further news

regard

bigie

2009/4/19, Paul Lalonde <communities-emailer@vmware.com>:

,

A new message was posted in the thread "HOWTO: Installing ESX Server from a

USB flash drive":

http://communities.vmware.com/message/1229575#1229575

Author : Paul Lalonde

Profile : http://communities.vmware.com/people/Paul Lalonde

Message:

Reply
0 Kudos
stromcooper
Contributor
Contributor

Another option you might explore is UNetbootin:

http://unetbootin.sourceforge.net/

Install this app, point it to your ISO (downloaded from VMware or customized), point it to a USB drive and go.

Only snag I've encoutered thusfar is a customized ISO with ~109 customized kickstart files. The menu it boots to only displayed the first ~20 or so files versus the full list.

Reply
0 Kudos
robusman
Contributor
Contributor

If you install esx 3.0 or esx 2.5 off USB stick first, then you can install esx 3.5 and select 'upgrade' .. this bypasses the anaconda partitoning screen, so anaconda won't crash as it usually does during a fresh 3.5 install of USB stick.

Reply
0 Kudos
donlee
Contributor
Contributor

this is a great thread, I downloaded as well and got the ESX setup to successfully boot, however now I am prompted with a message: "what type of media contains the packages to be installed?"

Local CDROM

Hard drive

NFS image

FTP

HTTP

neither local CDROm or Hard drive will allow me to access the USB stick. strange that the setup can boot to the USB stick but then cannot seem to see itself when its time to do the actual install. clearly this is a popular thread, and i think it would be great if VMware would just come out with a utility or something that properly sets up a USB stick for installing. It would save a lot of CDROMs going into the landfill and save a ton of time!

thanks

Reply
0 Kudos
lzhao
Contributor
Contributor

Hi,

I am new to this thread. I have the similar problem when I try to insatll ESX 3.5 onto a HP server. I need replace the hdstg2.img file. But have problem to down load it from the link you supply. Please help me to get the right URL to download hdstg2.img

Lzhao

Reply
0 Kudos
lzhao
Contributor
Contributor

Hi Paul,

I have the exact same problem when I boot ESX 3.5 from USB on a HP server. But I have probem to download your hdstg2.img patch. I hope you can help to get this patch

Thanks in advance,

linli Zhao, lao.chao@gmail.com

Reply
0 Kudos
hmjones8
Contributor
Contributor

All, I've managed to get the base process working much easier using a MultibootISO process from

1. Download

2. Attach your USB Drive and run the MultibootISOs-v0.3.exe utility. Select your USB drive and follow the steps to completion.

3. Copy your ESX 3.5 ISO to the root of your USB Drive. In my case esx-3.5.0_Update05-207095.iso

4. Use Wordpad (not notepad) to edit menu.lst file on the

root of your USB drive. You'll see several bootable linux options in

this file. Of course, unless you've downloaded them, the ISOs for these

options don't exist. Since we've already added the ESX 3.5 ISO you'll

need add the following section to the end of then menu.lst file (adjust as needed for your version of ESX)

title ESX 3.5 Update 5 CDROM

find --set-root /esx-3.5.0_Update05-207095.iso

map /esx-3.5.0_Update05-207095.iso (hd32)

map --hook

chainloader (hd32)

boot

5. Remember to set your server to boot from USB drive and that should be it!~

When installing ESX from USB drive you will be prompted for the Source for ESX packages. Choose Hard Disk instead of CDROM and then in my case I selected /dev/sdb1.

Everything works great, with exception of the Anaconda Partition issue seen here on the previous threads. I'll update this post once I figure out a way to fix that issue.

Cheers, Heath.

Reply
0 Kudos
hmjones8
Contributor
Contributor

Hi Paul,

I'm having the same issue others are having trying to download the hdstg2.img patch you so kindly posted. Broken link. I was wondering if you could send me copy and I'll be happy to post it on my website for others to access? Since it's 10mb you can send it to me through my gmail account bluewaterjones@gmail.com (they accept upto 25mb)

Cheers,

Heath

Reply
0 Kudos
LucianoPatrão

Hi

Since my HP server as only CD-ROM and not DVD, and the new VMware version is bigger(about 900Mb), I have try to install the VMware ESX 4.0 with the hmjones8 solution, all went well until the partition Options, then i get:

CD-ROM Missing: Insert the ESX Installation Media.

Any one have encounter this problem? How bypass this?

Thank You

JailBreak

IT Network Manager

If helpful Please award points

Thank You

Luciano Patrão

VCP-DCV, VCAP-DCV Design 2023, VCP-Cloud 2023
vExpert vSAN, NSX, Cloud Provider, Veeam Vanguard
Solutions Architect - Tech Lead for VMware / Virtual Backups

________________________________
If helpful Please award points
Thank You
Blog: https://www.provirtualzone.com | Twitter: @Luciano_PT
Reply
0 Kudos