Search the VMware Knowledge Base (KB)
View by Article ID

Using a USB flash drive to install ESXi 5.x for Scripted Install (2004780)

  • 3 Ratings


You can use a USB flash drive to store the ESXi installation or upgrade script that is used during scripted installation or an upgrade of ESXi. 
This article provides steps to build an appropriate USB flash drive for the installation of ESXi 5.x.  For more information on using Scripted Install feature of ESXi 5.x, see Deploying ESXi 5.x using the Scripted Install feature (2004582) and the vSphere Upgrade Guide.


You can create a USB Flash Drive to store an ESXi Installation or upgrade script. When multiple USB flash drives are present on the installation machine, the installation software searches for the installation script on all attached USB flash drives.

Note: These instructions assume that the USB flash drive is detected as /dev/sdb. It may vary on your system depending on the setup.

  • You must have access to a Linux machine to create the USB flash drive.
  • You must have a copy of the ESXi installation or upgrade script (the ks.cfg file)
  • Access to a USB flash drive. 
  1.  Attach the USB flash drive to a Linux machine that has access to the installation or upgrade script. 
  2. Create a partition table using this command:

    /sbin/fdisk /dev/sdb
    • Type d to delete partitions until they are all deleted.
    • Type n to create primary partition 1 that extends over the entire disk.
    • Type t to set the type to an appropriate setting for the FAT32 file system, such as c.
    • Type a to set the active flag on partition 1.
    • Type p to print the partition table.

      You see an output similar to:

      Disk /dev/sdb: 2004 MB, 2004877312 bytes
      255 heads, 63 sectors/track, 243 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
         Device Boot      Start         End      Blocks   Id  System
      /dev/sdb1   *           1         243     1951866    c  W95 FAT32 (LBA)

    • Type w to write the partition table and quit. 

  3. Format the USB flash drive with the Fat32 file system using this command:

    /sbin/mkfs.vfat -F 32 -n USB /dev/sdb1
  4.  Mount the USB flash drive using this command:

    mount /dev/sdb1 /usbdisk

  5. Copy the ESXi installation script to the USB flash drive using this command:

    cp ks.cfg /usbdisk

  6. Unmount the USB flash drive using this command:

    unmount /usbdisk

    The USB flash drive now contains the installation or upgrade script for ESXi and is ready for installation.



See Also

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.


  • 3 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)

Please enter the Captcha code before clicking Submit.
  • 3 Ratings