Skip to content

Instantly share code, notes, and snippets.

@keathmilligan
Created December 5, 2020 16:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keathmilligan/6ba080b2500f9d3ada5fd512af37787e to your computer and use it in GitHub Desktop.
Save keathmilligan/6ba080b2500f9d3ada5fd512af37787e to your computer and use it in GitHub Desktop.
Create bootable Windows 10 USB

Create a bootable Windows 10 USB drive (handles images >4GB):

Download Windows install ISO and insert USB drive. Open Administrator command window. Run diskpart:

Microsoft DiskPart version 10.0.19041.610

Copyright (C) Microsoft Corporation.
On computer: ABYSS

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online         1863 GB  1024 KB        *
  Disk 1    Online           14 GB    13 GB

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> clean

DiskPart succeeded in cleaning the disk.
DISKPART> conv mbr

DiskPart successfully converted the selected disk to MBR format.

DISKPART> create partition primary offset=32 size=1000

DiskPart succeeded in creating the specified partition.

DISKPART> format fs=fat32 quick label=WIN10
  100 percent completed

DiskPart successfully formatted the volume.

DISKPART> assign letter=X

DiskPart successfully assigned the drive letter or mount point.

DISKPART> active

DiskPart marked the current partition as active.

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> format fs=exfat quick label=WIN10EX

  100 percent completed

DiskPart successfully formatted the volume.

DISKPART> assign letter=Y

DiskPart successfully assigned the drive letter or mount point.

DISKPART> exit

Leaving DiskPart...

Update the boot code:

> bootsect /NT60 X: /MBR
Target volumes will be updated with BOOTMGR compatible bootcode.

X: (\\?\Volume{3ab47fec-36fc-11eb-b202-9848272e2061})

    Successfully updated FAT32 filesystem bootcode.

\??\PhysicalDrive1

    Successfully updated disk bootcode.

Bootcode was successfully updated on all targeted volumes.

Now mount the install ISO.

  • Copy all ISO contents to the the EXFAT partition (Y:).
  • Copy all ISO contents except sources to the FAT32 partition (X:).
  • Create X:\sources and copy boot.wim from the ISO into it.

Eject the ISO and USB volumes.

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