From 4942e9382ecf7a3016b655e847eb0f82f88d6ae5 Mon Sep 17 00:00:00 2001 From: Thomas Kuschel Date: Mon, 26 Aug 2024 20:03:55 +0200 Subject: [PATCH] ADD manual for Creating a Bootable Win10 USB drive --- bootable_windows10_usb_drive/README.md | 124 +++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 bootable_windows10_usb_drive/README.md diff --git a/bootable_windows10_usb_drive/README.md b/bootable_windows10_usb_drive/README.md new file mode 100644 index 0000000..f4ae5cb --- /dev/null +++ b/bootable_windows10_usb_drive/README.md @@ -0,0 +1,124 @@ +## 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/usb + ``` +15. Remove mount point directories: + ``` + # rm -r /mnt/{iso,usb} + ```