I had to create a USB Windows installation disc on my Debian 12 machine and found out it's slightly harder than I wanted it to be.
Regular linux ISO's use something called ISOHybrid which allows just a regular dd
command to exactly copy over the bytes.
Apparently Windows does not do the same thing according to
the developer of Rufus which I have used before on Windows to create Windows discs.
On Debian 12 I had to:
wget https://github.com/WoeUSB/WoeUSB/releases/download/v5.2.4/woeusb-5.2.4.bash
chmod +x woeusb-5.2.4.bash
sudo umount /dev/sdb1
sudo ./woeusb-5.2.4.bash
Install any packages you have missing. Make sure to run as sudo so it finds
the packages properly. I was missing sudo apt install wimtools
lsblk
Do NOT write over your own harddisc.
sudo ./woeusb-5.2.4.bash --device ./Win11_23H2_English_x64v2.iso /dev/sdb
Make
sure to use the proper disc path, it might not be sdb.
Info: Installing GRUB bootloader for legacy PC booting support... grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory. ERROR: The command ""${command_grubinstall}" --target=i386-pc --boot-directory="${target_fs_mountpoint}" --force "${target_device}"" failed with exit status "1", program is prematurely aborted
sudo apt install grub-pc-bin
fixed this, running the command again afterwards fixed the GRUB issue.
sudo ./woeusb-5.2.4.bash --device ./Win11_23H2_English_x64v2.iso /dev/sdb
--tgt-fs NTFS