How to create Windows bootable USB media for deployment on UEFI-based systems
Installing Windows from a USB drive can be faster than installing it from optical media. This also allows the operating system (OS) to be installed on devices like tablets that do not support optical media.
The following items are required to create a UEFI-bootable USB drive:
- USB drive
- Administrative privileges on the system used to create the bootable drive
- OS installation media
The following steps detail how to make the USB drive bootable and copy the OS installation media to the drive.
Note: Many commands within the Diskpart tool can be abbreviated, as shown in the screenshots below.
1. Insert the USB drive.
2. Open a command prompt using the Run as Administrator option.
3. Start the Diskpart tool by typing
diskpart
.
4. List all disks recognized by the system by typing
list disk
.
Figure 1: Output of the "list disk" command
5. Select your USB drive from the list returned (Disk 4 in this example) by typing
select disk 4
.
Figure 2: Output of the "select disk 4" command
6. Remove all data from the disk by typing
clean
.
Caution: This command destroys all data on the USB drive.
Figure 3: Output of the "clean" command
7. Convert the disk to GPT by typing
convert gpt
. This is a requirement of UEFI.
Figure 4: Output of the "convert gpt" command
8. Create a primary partition by typing
create partition primary
.
Figure 5: Output of the "create partition primary" command
9. Format the newly created partition by typing
format fs=fat32 quick
.
Figure 6: Output of the "format fs=fat32 quick" command
10. List the volumes associated with the system by typing
list volume
. Make note of the new volume's drive letter. (Volume 6, drive I: in this example.)
Figure 7: Output of the "list volume" command
11. Exit DiskPart by typing
exit
and pressing ENTER.
Figure 8: Exiting Diskpart
12. At the command prompt, use BootSect to update the bootcode on the GPT partition by typing
bootsect /nt60 I:
.
Figure 9: Successfully running "bootsect /nt60 I:"
13. Insert the OS media or mount the applicable ISO image.
14. Copy the entire contents of the installation media to the USB drive.
Note: The FAT32 file system only allows file sizes up to 4 GB. If the installation image includes an
install.wim file larger than this, attempting to copy it to the USB drive results in an error. To work around this, split the
install.wim file into multiple files. See
this Microsoft Learn article
for the steps involved in splitting the file, as well as other options. Copy the resulting
.swm files to the USB drive in place of the
install.wim file.
The USB drive can now be used as OS installation media. Boot to the USB drive to begin the installation. To perform an in-place upgrade of a running OS, insert the USB drive and allow
setup.exe to auto-run or launch it from File Explorer.