I needed to re-install Windows 10 on my PC after an SSD failure, but after reading many tutorials online, the best I could get was booting to the install screen and it getting stuck at 0% then erroring. After many hours of trying, I eventually found the solution to my problem on Superuser. I’ve gone ahead and put all the steps I took to get it working below.
This is an amalgamation of the guide I initially used from here and the answer to issue from here. The answer to my problem ended up being to switch the USB drive from being formatted with a GPT partition table to a MBR partition table.
I’m starting with the assumption that you have an ISO to hand, if not you can download one from Microsoft here.
Step 1 – Identify your external USB drive
Open up terminal and run:
You should see a list of all drives that your Mac can currently see, this will include your internal boot drive so make sure to be careful and choose the correct drive from here on out. Locate your USB drive in the list and make a note of the name, this will be something along the lines of “/dev/disk3” (the number on the end will change for each attached drive).
Step 2 – Format your USB drive
This step took me a long time to get working, but I eventually found the solution via Superuser here.
Run the following in terminal, making sure to add the correct drive identifier from step 1 at the end:
diskutil eraseDisk MS-DOS "WIN10" MBR /dev/id_from_step_1
Step 3 – Mount the Windows 10 ISO
Run the below in terminal, you may need to change the name and folder location here:
hdiutil mount ~/Downloads/Win10_22H2_EnglishInternational_x64v1.iso
Step 4 – Copy the Windows 10 ISO onto your USB drive
This is split into a few different steps as some files are too large for Fat32 formatted USB drives.
First copy everything that will natively fit:
rsync -vha --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-GB_DV9/* /Volumes/WIN10
Where I’ve got “CCCOMA_X64FRE_EN-GB_DV9”, you may need to change this to whatever your ISO mounted as from step 3
Next, create a new folder on your USB drive:
Now, we’re going to use something called “wimlib” to split the file that’s too large to copy. If you don’t have wimlib installed, run (you’ll need homebrew):
brew install wimlib
Once installed, run:
wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-GB_DV9/sources/install.wim /Volumes/WIN10/sources/install.swm 3800
Same as before, where I’ve got “CCCOMA_X64FRE_EN-GB_DV9”, you may need to change this to whatever your ISO mounted as from step 3.
Step 5 – Boot from the USB on your PC
That should be everything, you should now have a working USB install disk that you can boot from.