## Create a Bootlabe Windows 10 USB Drive using LINUX Arch A manual from the site [adamsdesk](https://kb.adamsdesk.com/operating_system/create_a_bootable_windows_10_usb_using_linux/), was adapted to my needs. *Version 1.0* ### Prerequisite #### Assumptions * Instructions using Arch Linux * USB drive with a minimum of 8 GB * Steps prefixed with "$" represents the CLI prompt with normal user access rights * Steps prefixed with "#" represents the CLI prompt with root access rights #### Preparation Install the following packages from the Arch Linux distribution ``` $ yay -Sy ms-sys ntfs-3g rsync ``` ### Instructions 1. Download the latest Windows ISO from Microsoft [here](https://www.microsoft.com/en-us/software-download/windows10ISO), 2. Plug in the USB flash drive, 3. Locate the USB device name: ``` $ lsblk ``` ``` NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 5,7G 0 loop /mnt/iso sda 8:0 1 7,5G 0 disk └─sda1 8:1 1 7,5G 0 part nvme0n1 259:0 0 1,8T 0 disk / ``` 4. Unmount the UB flash drive: ``` # umount /dev/sda1 ``` 5. Create USB flash drive partition: ``` # fdisk /dev/sda ``` a.) Press `D` then press `` to delete all partitions, b.) Press `N` then press `` to create a new partition, c.) Press `` to accept default (p for primary), d.) Press `` to accept default partition number, 1, e.) Press `` to accept default first sector, f.) Press `` to accept default last sector, ``` Note: Say yes if prompted for "Do you want to remove the signature". ``` g.) Press `T` then press `` to change partition type, h.) Press `7` then press `` to set partion type to **HPFS/NTFS/exFAT**, i.) Press `P` to verify: ``` Disk /dev/sda: 7,5 GiB, 8053063680 bytes, 15728640 sectors Disk model: Flash Disk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x8bfaef3a Device Boot Start End Sectors Size Id Type /dev/sda1 2048 15728639 15726592 7,5G 7 HPFS/NTFS/exFAT ``` j.) Press `W` then press `` to write table to disk and exit, 6. Format partition file system to NTFS: ``` # mkfs.ntfs -L win10 /dev/sda1 ``` 7. Create mount points: ``` # mkdir /mnt/{iso,usb} ``` 8. Mount Windows ISO: ``` # mount ~/Downloads/Win10_22H2_English_x16v1.iso /mnt/iso ``` 9. Mount USB drive partition: ``` # mount /dev/sda1 /mnt/usb ``` 10. Copy files from Windows ISO to USB flash drive using `rsync`: ``` # rsync -avP /mnt/iso/ /mnt/usb/ ``` 11. Make USB flash drive bootable with: ``` # ms-sys -7 /dev/sda ``` ``` Windows 7 master boot record successfully written to /dev/sda ``` 12. Run **sync** to ensure all operations have completet, ``` # sync ``` 13. Unmount USB flash drive, ``` # umount /mnt/usb ``` 14. Unmount Windows ISO, ``` # umount /mnt/iso ``` 15. Remove mount point directories: ``` # rm -r /mnt/{iso,usb} ```