Create bootable Windows USB from Apple Silicon Mac

Got myself a Mac Studio and decomissioned my Hackintosh for my kids to use as a gaming computer mainly. Doing a Windows install - Wow, just wow. The 90's called and wanted their ux back.

  • 4GB limit on Fat32, install.wim is 5GB
  • Splits just doesn't work
  • Somethingsomething

The only thing that seems to work from a Apple Silicon mac is multiple sticks:

Main USB stick:

diskutil list
diskutil eraseDisk MS-DOS WIN10_USB1 MBR diskX
diskutil unmountDisk /dev/diskX
sudo dd if=/Users/viktor/Downloads/Win10_22H2_Swedish_x64v1.iso of=/dev/diskX bs=1M
diskutil unmountDisk /dev/diskX

Second stick

Mount win iso disk image

diskutil eraseDisk ExFAT WIN10_USB2 MBR diskX
rsync -avh --progress /Volumes/<Windows 10 ISO Name>/sources /Volumes/WIN10_USB2
diskutil unmountDisk /dev/diskX

https://gist.github.com/bmatcuk/fda5ab0fb127e9fd62eaf43e845a51c3?permalink_comment_id=3616595

It's 1M on Gnu dd and 1m on Apple's I think.

Install

After first messing up some install, the windows installer got really confused and refused to install on anything. Doing a clean delete of all partitions didn't work as it complained about system partition being too small. What system partition - I have a full clean disk and it worked fine the first time around? So I manually created a system partition while leaving the rest free:

diskpart
list disk
select disk 1
clean
convert gpt
create partition efi size=100
format quick fs=fat32 label=”System”

Then I could select the unallocated space below this partition to install. Just weird.

Needs to be gpt on UEFI.

The install seems to work at first, but when it's time for a reboot it complains about something and undo it all. I think what happens is that it can't reboot onto the newly installed system because I had a hackintosh installation on another disk. I therefore temporarily removed that disk and it installed fine this time. Idea is to just put it back and then I'll see if the opencore boot thingie can simply add the Windows disk as a meny item?

Partition UEFI/GPT HDD Using Diskpart - Windows Enterprise Desktop
For some reason Windows Installer puts the WinRE partition at the head of its disk layout. We partition UEFI/GPT HDD using diskpart to put it at the end, where it belongs.