Create Windows 10 USB Drive on macOS

Przemyslaw Ozgo
1 min readApr 12, 2021

--

First, you need to download the ISOfile from Microsoft.

  1. Format USB Disk
# Get list of all diskssudo diskutil list
/dev/disk4 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *30.9 GB disk4
1: EFI ⁨EFI⁩ 209.7 MB disk4s1
2: Microsoft Basic Data ⁨WIN10⁩ 30.7 GB disk4s2
# Format (In my case disk4)
sudo diskutil eraseDisk MS-DOS "WIN10" GPT /dev/disk4
Started erase on disk4
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk4s2 as MS-DOS (FAT) with name WIN10
512 bytes per physical sector
/dev/rdisk4s2: 59995488 sectors in 1874859 FAT32 clusters (16384 bytes/cluster)
bps=512 spc=32 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=411648 drv=0x80 bsec=60024832 bspf=14648 rdcl=2 infs=1 bkbs=6
Mounting disk
Finished erase on disk4

2. Mount ISO

hdiutil mount ~/Downloads/Win10_20H2_v2_EnglishInternational_x64.iso

3. Copy data from ISO to new USB Disk and make sure to exclude sources/install.wim

rsync -vha --progress --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-GB_DV9/* /Volumes/WIN10

4. Install wimlib

brew install wimlib

5. Use wimlib to split install.wim

wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-GB_DV9/sources/install.wim /Volumes/WIN10/sources/install.swm 3800
Writing "/Volumes/WIN10/sources/install.swm" (part 1 of 2): 0 MiB of 5042 MiB (0%) written
Writing "/Volumes/WIN10/sources/install2.swm" (part 2 of 2): 3784 MiB of 5042 MiB (75%) written
Finished writing split WIM part 2 of 2

Unmount USB disk and insert into a windows machine. Boot from USB

--

--

Przemyslaw Ozgo
Przemyslaw Ozgo

Written by Przemyslaw Ozgo

I eat Docker for breakfast, Ansible for lunch and for dinner I usually have Jenkins, and I like to spice it up with Go and Bash.

No responses yet