Skip to content

Instantly share code, notes, and snippets.

@shad0wuser
Last active February 14, 2018 17:39
Show Gist options
  • Save shad0wuser/91a66b741a8cd8081f1ff4d59e080757 to your computer and use it in GitHub Desktop.
Save shad0wuser/91a66b741a8cd8081f1ff4d59e080757 to your computer and use it in GitHub Desktop.
Windows bootable USB Stick with UEFI support using command prompt

Windows bootable USB Stick with UEFI support using command prompt

Make a bootable USB flash drive using DISKPART

Run cmd.exe as an administrator then run diskpart with the following commands:

Shows all mounted disks. Find your USB flash

list disk

Selects the disk that future commands will use. Replace n with the disk # for your USB flash drive. NOTE: Be careful that you don’t select your hard disk! The next command will wipe the selected drive clean.

select disk n

Erases all previous partition & volume information on the flash drive.

clean

Partitions the flash drive as one partition for the whole drive.

create partition primary

Selects the new partition so future commands will operate on it.

select partition 1

Marks the new partition as active so the BIOS/UEFI can boot to it.

active

Formats the partition as FAT32. (NOT NTFS!)  EXTREMELY IMPORTANT!

format fs=FAT32 quick

Assigns a drive letter to the flash drive.

assign

Exits diskpart

exit

At this point your USB drive is formatted.  DO NOT format the drive with Windows Explorer, you will not be able to boot from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment