Good Luck!
Download the ISO you want to install from Microsoft, here.
1. Connect your USB drive
2. Open Terminal
3. Use diskutil list
to determine which drive is your USB drive. Mine registered as /dev/disk3
1. Format the USB drive with a MS-DOS
filesystem type, the name WIN10
, and a GPT
partition table using the following command.
MBR may need to be used in place of GPT depending on your setup.
This is erase all data on the drive.
diskutil eraseDisk MS-DOS "WIN10" GPT /dev/disk3
Locate the Windows ISO you want to use - if you just downloaded the ISO, it'll likely be in ~/Downloads
.
1. Mount the ISO to your local system
hdiutil mount ~/Downloads/Win10_21H2_English_x64.iso
If successful, the command will return with where it mounted the image and its Volume name.
/dev/disk4 /Volumes/CCCOMA_X64FRE_EN-US_DV9
This process won't be as cut and dry - the MS-DOS filesystem doesn't allow for file sizes greater than 4GB (there is an installer file that is >4GB) so one of the files will have to be sliced into two parts.
1. Use rsync to copy the contents of the ISO to the USB drive (this excludes the install.wim
file that is too large for MS-DOS)
rsync -vha --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/* /Volumes/WIN10
2. Install wimlib
via Homebrew. If you haven't heard of Homebrew, check out this page.
brew install wimlib
3. Split the install.wim
file into 3.8GB files and place them on the USB drive.
wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WIN10/sources/install.swm 3800
Once wimlib is done, eject the USB drive from your system.
You can now boot from the USB on another computer and run the Windows installation.