Install VMware ESXi 4.1 from bootable USB stick
Not all servers nowadays have a DVD player installed. Sometimes it is handy to boot from USB and installing a single VMware ESXi server. Here’s a example how to make the USB stick bootable and install VMware ESXi 4.1 from it by using Windows.
Preparation:
- Need 1GB USB memory stick or more.
- Download the VMware ESXi 4.1 ISO named VMware-VMvisor-Installer-4.1.0-260247.x86_64.iso (In this example I used the VMware vSphere Hypervisor version).
Update: The latest version of VMware ESXi is 4.1 Update 1 (VMware-VMvisor-Installer-4.1.0.update1-348481.x86_64.iso). It solves the “Total number of sectors” bug in VMware ESXi 4.1. It is recommend to use this version so the “mod.tgz” workaround isn’t needed anymore!
- Download Syslinux, can be found by clicking on the following link. Download the latest Syslinux zip file (when writing this article syslinux-4.02.zip was the latest).
Update: Also tested Syslinux version 4.03.
Stick the USB stick on a free USB port on your computer equipped with a Windows OS. For this example I used Windows7 as Operating System. Clear the USB stick and create a partition on it by using the following command’s:
- Open the command prompt and enter the following commands:
Diskpart (make sure you run diskpart as administrator)
list disk (list the disk in your system including the USB)
select disk USB number
clean
create partition primary
active
format fs=fat32 quick
assign
exit
To make the USB stick bootable:
- Extract the Syslinux ZIP and browse to the the \syslinux\win32 folder, execute “syslinux [drive letter USB stick]”, example syslinux f:
- Mount the ISO and copy all the content of the VMware ESXi 4.1 ISO to the USB stick. For mounting the ISO, I used ‘Deamon Tools Lite’ tool.
- Rename the isolinux.cfg file to syslinux.cfg
- Edit the syslinux.cfg and add ks=usb and on the end of the append line — mod.tgz (beware of the space between — and the mod.tgz).
Update: When using VMware ESXi 4.1 Update 1 the mod.tgz line doesn’t need to append!
default menu.c32
menu title VMware VMvisor Boot Menu
timeout 80
label ESXi Installer
menu label ^ESXi Installer
kernel mboot.c32
append vmkboot.gz ks=usb --- vmkernel.gz --- sys.vgz --- cim.vgz --- ienviron.vgz --- install.vgz --- mod.tgz
label ^Boot from local disk
menu label ^Boot from local disk
localboot 0x80
- Create a ks.cfg file in the root from the UBS stick. For example:
rootpw VMware01
install usb
autopart --firstdisk --overwritevmfs
reboot
#Network install type
network --bootproto=static --addvmportgroup=false --device=vmnic0 --ip=192.168.1.10 --netmask=255.255.255.0 --gateway=192.168.1.1 --nameserver=192.168.1.1 --hostname=ESXi-01.beerens.local
accepteula
%firstboot --unsupported --interpreter=busybox
vim-cmd hostsvc/datastore/rename datastore1 "$(hostname -s)-local-storage-1"
- Copy the syslinux-4.02\com32\mboot\mboot.c32 file the USB stick (overwrite the old file on the USB stick)
- Copy the syslinux-4.02\com32\menu\menu.c32 file the USB stick (overwrite the old file on the USB stick)
The bootable VMware ESXi 4.1 stick is ready for use. When booting the USB stick the following message is displayed “Total number of sectors not a multiple of sectors per track! Add mtools_skip_check=1 to your .mtoolsrc file to skip this test”.
Update: When using VMware ESXi 4.1 Update 1 this bug is fixed. You’re ready to use the USB stick!
On the VMware communities I found the following post. This post states a manual solution by using the following commands:
- Press ALT-F1
- Login by using the root account with no password
- echo “mtools_skip_check=1”>.\mtoolsrc
- ALT+F2 and return to the orginal Console window
- Press ENTER or wait to continue
To automate the above solution read the following blogpost “VMware ESX 4.1 install using Western Digital USB Hard Drive” . By using this blogpost I created a mod.tgz file by using the following commands from a full installation of VMware ESXi 4.1:
- Login the VMware ESXi 4.1 console
- Make a directory in the root for example mkdir temp
- cd temp
- mkdir –p etc/vmware/init/init.d/
- cd etc/vmware/init/init.d/
- vi 47.mtoolshack
echo "mtools_skip_check=1" >/.mtoolsrc
return ${SUCCESS}
- Save the fi using the command :wq in VI
- cd /temp
- tar czvf mod.tgz etc
- SCP the file mod.tgz file to the USB stick
The mod.tgz can also downloaded, so the above steps can be skiped. On the end of this article is a download link for the mod.tgz.
The mod.tgz contains an init script which skips the mtools check. Now you’re ready to boot your server with the USB stick and your able to install VMware ESXi 4.1.
Download mod.tgz
Update : When using VMware ESXi 4.1 Update 1 there is no need to add the mod.tgz because this bug is fixed.










Thankyou so much. This worked like a charm.
I have been trying to automate the creation of a USB drive to install ESXi 4.1. I need to use windows to format the USB drive and was getting the error “Total number of sectors not a multiple of sectors per track!”
I am just wondering what is the difference between your method and the one described in the following url:
http://www.vladan.fr/installing-esxi-4-onto-usb-memory-stick-using-vmware-workstation-video/
@Ian VDS did you create or download the mod.tgz file and put it in the root of the USB stick?
Thanks.
I was stuck trying to install the new HP Proliant MicroServer from a USB key. I used UNetbootin to create the USB boot drive from the VMware ISO image, but with a simple KS script, I was stuck on the mtools error.
With your mod.tgz file added to the append command, works like a charm.
Why going through all these troubles while u could have ESXi does all the dirty work for you by using a VMware workstation. I did just that in 5 minutes, no download, no formatting and no brainer. I verified and ensured it did work by booting the USB drive on a HP DL380 G5.
@MobyChien
There is a difference between this blogpost and the VMware Workstation method.
The method in this blogpost is about creating a bootable VMware ESXi 4.1 install USB media. It is possible to boot and install one or more server with VMware ESXi 4.1 to the local harddisk of the server(s) for example.
The VMware Workstations method is only about creating a bootable USB VMware ESXi 4.1 stick.
Thanks for pointing out the difference. I followed your instructions and got it working (almost), except:
1. syslinux-4.02\com32\mboot\menu.c32
should be “syslinux-4.02\com32\menu\menu.c32″
2. The installer does not recognize the following command in ks.cfg:
vim-cmd hostsvc/datastore/rename datastore1 “$(hostname -s)-local-storage-1″
BTW, the latest syslinux is 4.03 now.
This was just what I was looking for. Thanks for publishing.
I have followed all these instructions closely and find that I just get a different error everytime I try and run this. Either ks=usb can not be found, or the Total number of sectors not a multiple of sectors per track! Add mtools_skip_check=1 to your .mtoolsrc file to skip this test error even though I have downloaded and added the Mod file. has no one automated this process yet?
Thank you
Simon
I am having trouble getting this to work. Do I need to extract the mod.tar file or just rename it to mod.tgz?
I create new blocks for the code, so the copy/paste work better.
@SimpleSimon Copy the code from the site and make sure the — mod.tgz is added to the syslinux.cfg. There is a space between — and mod.tgz
@Richard No download the mod.tgz and copy the file to the root of the USB stick, make sure that the
Installation works fine, i’ve copied mod.tgz to usb stick, but when i like to custumize my system it requires a password, …
ok, i found it in the script above stupid me, after a small fight typing qwerty on my azerty i’m now logged in …
Hello,
Use the latest official download of “ESXi 4.1 Installable”. Edit the syslinux.cfg and ks.cfg as exactly as shown above you can copy paste if you like however remove the — mod.tgz from the steps and use “syslinux 4.03″ and remmember to have a ethernet cable attached and you are good to go without any of the errors previously stated on with versions 4.02 and 4.03.
Perfect. It worked like a charm on HP ML110 G6. Couple of confusions from the blog at first point but later on were sorted out. May be hlepful for others reading this blog.
I could not see USB stick in list after using DiskPart command. so i bypassed this process and it worked without any problem for me
After pressing Alt F1, the command you enter, is shown wrong in this blog at the first stage but is corrected on command prompt screen print i.e. echo “mtools_skip_check=1″ >/.mtoolsrc
For new commers to VMWare like me, the defalut password for root has been changed to “VMware01″ in ks.cfg file
. At first point i was confused why its not loging in with defalut blank password. he he he
Worked like a charm (with the downloaded mod.tgz) on an Dell R810. Thanks!
I think this could be added to the oem file too. going to see if I can add it as a option in my script
http://code.google.com/p/mkesxiaio/
This is a great article. This process works!
As per Richard’s post (below), the mod.tgz is downloading as mod.tar even though the hyperlink points to “http://www.ivobeerens.nl/wp-content/uploads/mod.tgz”. I downloaded it on both an XP and a Windows 7 machine with the same result. Any Ideas? The file inside the archive (mod.tar) is mod with no extension. Should I rename mod.tar to mod.tgz or extract mod and name it mod.tgz?
Thanks,
Colin
QUOTE:
“Richard:
November 2, 2010 at 18:10
I am having trouble getting this to work. Do I need to extract the mod.tar file or just rename it to mod.tgz?”
Great article. The final mile to get it up on my Dell Studio 540 (after getting an intel gig. server network card).
nothing seemed to happen when I did the “syslinux [drive]:”, so here’s my workaround:
-Unetbootin to create the bootable usb from iso.
-only appended “ks=usb” to syslinux.cfg,
-created ks.cfg (changed network setting in file),
-and during install did the ” echo “mtools_skip_check=1”>.\mtoolsrc ” tip.
Great article! Got my HP Microserver running Esxi4.1 in no time.
As some other replies have noted, I downloaded the mod.tgz, added it to the syslinux.cfg APPEND. Thanks for that. However, I don’t see the value of adding the kickstart usage in this post. I think most people will just be happy to have their flash drive run exactly as the esxi installer iso does; if so, they should leave out the ks=usb and not create the ks.cfg.
I am not a linux wiz by any means so forgive my linux ignorance. What is the answer to this question?
” Colin:
January 7, 2011 at 01:31
As per Richard’s post (below), the mod.tgz is downloading as mod.tar even though the hyperlink points to “http://www.ivobeerens.nl/wp-content/uploads/mod.tgz”. I downloaded it on both an XP and a Windows 7 machine with the same result. Any Ideas? The file inside the archive (mod.tar) is mod with no extension. Should I rename mod.tar to mod.tgz or extract mod and name it mod.tgz?
Thanks,
Colin
QUOTE:
“Richard:
November 2, 2010 at 18:10
I am having trouble getting this to work. Do I need to extract the mod.tar file or just rename it to mod.tgz?”
Thank you in advance for your help.
Also, after i put in the mtools check skip line manually everything appears to install successfully and the system says it needs to reboot. After a reboot however, the esxi os is no there. What is going on?
Possibly fixed in 4.1 u1:
http://www.vmware.com/support/vsphere4/doc/vsp_esxi41_u1_rel_notes.html#resolvedupgradeandinstallissues
Thought haven’t had a chance to confirm yet.
As TimB I’m getting the same thing – I’m a noob with vmware and it does look to a degree that this works but local disc option doesn’t work once install has been completed.
This is an automatic and unattended installation of vmware esxi, is there a way to do it manually, while booting from usb?
Please note that syslinux does not support USB sticks larger than 2 GB formatted like described above (usually indicated by some error message about it’s config file).
Either format it with a small FAT partition or use another method to create a proper FAT32 partition > 2 GB.
Update: The latest version of VMware ESXi is 4.1 Update 1 (VMware-VMvisor-Installer-4.1.0.update1-348481.x86_64.iso). It solves the “Total number of sectors” bug in VMware ESXi 4.1. It is recommend to use this version!
This is working nice, except if you want to install from USB to a SD Card in the server, for instance the DELL R710 server.
From http://www.vmware.com/support/vsphere4/doc/vsp_41_new_feat.html:
“Scripted Install for ESXi.
You cannot use scripted installation to install ESXi to a USB device.”
I have tried not entering the line “ks=usb”. It lets me choose to install on the SD Card, but ends up with an error.
Anyone has an idea how to fix this ? I just want to boot from USB and install onto SD card in server ?
Thanks in advance!
Be careful when installing with this USB. I have just deleted data on a SAN. Luckily for me it was not data I was going to use.
So remember to remove all drives and cables to disksystems you want to keep!
This line from the KS.CFG deletes the first volume the install finds:
autopart –firstdisk –overwritevmfs
Hi,
after few hours surfing and testing best tricks and tips I have found this excellent site and howto and this is the only one which works!
Many thanks
I have followed the directions perfectly as they are posted as of 04/14/2011 and it does not appear to work.
I get the following output (verbatim):
SYSLINUX 4.03 2010-10-22 CHS Copyright (C) 1994-2010 H. Peter Anvin et al
ERROR: No configuration file found
No DEFAULT or UI configuration directive found!
boot: _
I have tried this on both a 500mb and 4GB USB drive, both with the same result.
Please help!
Very useful post, can you write another one (that will be clearer) for ESXi 4.1 Update 1? Thank you.
For those who have problem with kickstart script, I used a different syntax in the syslinux.cfg
instead of “ks=usb”, I write “ks=usb:/ks.cfg”, and it worked.
(cf vsp_41_esxi_i_vc_setup_guide.pdf page 46)
Thanks to Dje for figuring this out:
http://blog.vmpros.nl/2010/09/03/vmware-how-to-create-a-bootable-esxi-usb-stick/
Worked for me… Thanks. Only issue I had was installing hypervisor on the wrong drive. Watch the following in sg.cfg. As you/I would expect, it will take the first drive in the boot order and vmfs. My Windows7 drive is gone but it is a test machine.
autopart –firstdisk –overwritevmfs
Has anyone been able to get this to work installing TO a USB drive from the above created drive? The problem I’ve run into is:
autopart –firstdisk
This command will only install to the first non-USB disk. I did an alt-F1 after the install was started up, root with no password, and then fdisk -l to see that my USB drive is listed as:
/dev/disks/vmhba32:C0:T0:L0:
Modifying the ks.cfg:
autopart –disk=/dev/disks/vmhba32:C0:T0:L0:
Still fails with the installer saying that the drive was not found. Any ideas?
kv1018 – i had the same problem.
Make sure you disconnect any drives other than the one you want to install too! I installed to my 750GB storage drive.
Other than that, it worked beautifully.
I tried the method and everything seemed to work till the point the actual installation began. All the modules got loaded, and just when the installation began, I got an error saying
/sbin/mcopy imagedd.bz2 not found and then after a few seconds, I got another error saying the md5 sums did not match.
I used the exact method given here. Has anyone else encountered this issue before? Thanks.
I am getting
‘specified in autopart does not support vmfs’
any suggestions?
JASON
try this
autopart –disk=mpx.vmhba32:C0:T0:L0
problem with mod.tgz download. The above given link downloads a .tar file. I have renamed it simply from mod.tar to mod.tgz and it worked. by the way i got syslinux version 4 and all works the same way.
I followed the instructions to the letter with ESXi 4.1 Update 1, and the install worked perfectly. However, I can’t login to the server, either from the console or the vSphere Client!
I’ve tried ‘root’ with no password, ‘root + ‘root’, [blank] + ‘root’, ‘root’ + ‘password’, and about a dozen other combinations. I get the same error every time: ‘Cannot complete login due to an incorrect username and password’. I am going nuts! I’ve re-installed 3 times, always with the same result.
HELP!!!!
Great Article.. Thanks a lot… I got it running on my Dell Precision laptop, which is not on the VMware HCL
. Would not install using CD ROM.
Excellent article! Finally got ESXi 4.1u1 installed after trying couple of other “install from usb”-examples out there which didn’t work.
Just as a sidenote: Had to use “fs=fat” in diskpart to get the usb stick to boot properly. With “fs=fat32″ option I got error message “No DEFAULT or UI configuration directive found” during boot of the usb stick.
@Pat: What rootpw did you enter in ks.cfg (line 1)?
Thank you for this article!
This was the only solution how I get it working! I got it running on a Gigabyte GA-MA78LMT-US2H.
Pingback: Moving from VMWare Server 2 to VMWare ESXi 4.1 – a walkthrough | Leigh's Persistent Thoughts
Hi,
I’m trying to install on HP 360G7 server which is 100% compatible with esxi 4.1 u1 gotten from hp website.
I manage to boot from the usb but after loading the files it returns the following error:
This system does not have a network interface card that is plugged in, or all network interface cards are already clained. Installation cannot continue as requested.
I encounter the exact same problem as the one listed here : http://communities.vmware.com/message/1794922 which didn’t get any replies yet
Any ideas? Thx in advance
@Pat
Regarding the password…it’s VMware01 it’s stated in the 1st line of the ks.cfg. This might be late, but it might help others. This worked great.
Great article and it helped me a lot.