Creating an Install Image for Windows 10 on a Mac
Insert your memory stick (16GB Minimum) and check the disk which is associated to it by executing the command diskutil list | grep external
:
$ diskutil list | grep external
/dev/disk2 (external, physical):
To erase and format the memory stick run the following command substituting diskN with the disk displayed by the previous command:
# Be very careful with this command
diskutil eraseDisk MS-DOS " WIN10" MBR diskN
Download and Mount your Windows 10 ISO
$ hdiutil mount ~ /Downloads/Win10_20H2_v2_English_x64.iso
/dev/disk3 /Volumes/CCCOMA_X64FRE_EN-US_DV9
Copy the ISO image to the Memory Stick
Copy files from the ISO to the Memory Stick (notice the second to last argument is the mount point returned by the previous command result):
rsync -vha --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/ /Volumes/WIN10
brew install wimlib
Split install.wim into 4,000MiBs chunks to the Memory Stick
wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WIN10/sources/install.swm 4000