Windows 11 installation

Installing Windows 11 when the only thing you have is dd in Linux (spoiler: dd will not work)

Useful link was: https://gist.github.com/dragon788/26921410d8de054366188c5c5435ae01

In Bash, for 7z commands, ! needs to be replaced by \! and quotes can be removed.

Make 1 FAT32 partition on USB drive, make it active. 8GB USB drive recommended. Use fdisk and mkfs.vfat. After that, mount the FAT partition to /folder/to/usb and then do this:

export ISO_FILE=/path/to/windows.iso
export USB_DRIVE=/folder/to/usb
mkdir ~/tmp
export TEMP=~/tmp
7z x -xr\!install.wim $ISO_FILE -o$USB_DRIVE
7z x -ir\!install.wim $ISO_FILE -o$TEMP
wimsplit $TEMP/sources/install.wim $USB_DRIVE/sources/install.swm 3000

Other