Windows 7 / Getting Started

Creating a Bootable USB Flash Drive

You can create bootable Windows PE images on USB flash drives as long as the flash drive has the capacity to store the entire Windows image. You might need to modify computer firmware to allow booting from USB disk devices.

To create a bootable USB flash drive, insert the device into a USB port, and then use the DiskPart utility to prepare the device. The commands you need to run are as follows:

  1. At an elevated administrator command prompt, enter diskpart, and then enter list disk. Note the disk number and size of the USB flash drive.
  2. Enter select disk n, where n is the device you are preparing.
  3. Enter clean to wipe the device and remove all contents.
  4. Enter create partition primary size=size, where size is the size in MB of the USB flash drive listed previously.
  5. Enter select partition 1 to select the partition you just created, and then enter active to mark the new partition as active.
  6. Enter format fs=fat32 to format the partition with the FAT32 file system.
  7. Enter assign to assign the next available drive letter to the USB flash drive, and then enter exit to quit DiskPart. Note the drive letter assigned in the output. Don't exit the command prompt.
  8. Write a new boot sector to the USB flash drive by entering bootsect /nt60 e:/force , where e: is the drive letter of the USB flash drive.
    Note Bootsect is in the petools\x86 and petools\amd64 folders within the build. Use the version of Bootsect that supports the type of Windows pe image you are creating.
  9. Copy the contents of your ISO folder to the USB flash drive by entering xcopy /echry c:\winpe_x86\iso\*.* e:\.

When the copy is complete, remove your USB flash drive. The USB flash drive is now bootable Windows media.

Note Some USB flash drives do not support this preparation process, and you might not be able to make the device bootable in this way. the devices that do not support this process are typically set so they are recognized as removable media devices and not USB disk devices. Because of this, you might need to refer to the device manufacturer's Web site for formatting documentation and tools.

[Previous] [Contents] [Next]