Skip to content

Create A Bootable Windows 10 USB Using Linux

Prerequisite

Assumptions

  • Instructions using Arch Linux operating system
  • Instructions done via the command line interface (CLI) (terminal/console)
  • Have a Arch Linux AUR helper previously installed
  • Have a USB flash drive that can be cleared of data
  • Tested using Windows 10 Build 1909
  • Steps prefixed with a "$" (dollar sign) represents the CLI prompt. The text after the "$" is to be entered at the CLI.
  • Steps prefixed with a "#" (number sign) represents the CLI prompt with elevated user permissions (e.g. root). The text after the "#" is to be entered at the CLI.

Preparation

Install the following Arch Linux packages. Similar packages maybe used on other Linux distributions.

$ pikaur -Sy ms-sys ntfs-3g rsync

Note

The "rsync" package is optional.

Instructions

  1. Download the latest Windows ISO from Microsoft.
  2. Plugin the USB flash drive.
  3. Locate the USB device name.
    $ lsblk
    
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:32   0 238.5G  0 disk
    ├─sda1   8:33   0   499M  0 part /boot
    └─sda2   8:34   0   238G  0 part /srv
    sdb      8:48   0   1.8T  0 disk /mnt/data
    sdc      8:64   0  7.47G  0 disk
    └─sdc1   8:65   0  7.47G  0 part
    sr0     11:0    1  1024M  0 rom
    
  4. Unmount USB flash drive.
    # umount /dev/sdc1
    
  5. Create USB flash drive partition.

    # fdisk /dev/sdc
    

    1. Press D then press Enter to delete all partitions.
    2. Press N then press Enter to create a new partition.
    3. Press Enter to accept default (p for primary).
    4. Press Enter to accept default partition number, 1.
    5. Press Enter to accept default first sector.
    6. Press Enter to accept default last sector.

      Note

      Say yes if prompted for "Do you want to remove the signature".

    7. Press T then press Enter to change partition type.

    8. Press 7 then press Enter to set partition type to HPFS/NTFS/exFAT.
    9. Press P to verify.
      Disk /dev/sdc: 7.47 GiB, 8011120640 bytes, 15646720 sectors
      Disk model: USB Flash Drive
      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: 0x16a59ab8
      
      Device     Boot Start      End  Sectors  Size Id Type
      /dev/sdc1        2048 15646719 15644672  7.5G  7 HPFS/NTFS/exFAT
      
      Filesystem/RAID signature on partition 1 will be wiped.
      
    10. Press W then press Enter to write table to disk and exit.
  6. Format partition file system to NTFS.

    # mkfs.ntfs -L win101909 /dev/sdc1
    

  7. Create mount points.
    # mkdir /mnt/{iso,usb}
    
  8. Mount Windows ISO.
    # mount ~/Downloads/Win10_1909_English_x64.iso /mnt/iso
    
  9. Mount USB partition.
    # mount /dev/sdc1 /mnt/usb
    
  10. Copy files from Windows ISO to USB flash drive.

    Note

    Use only one of the examples below.

    # rsync -avrP /mnt/iso/* /mnt/usb/
    
    # cp -avr /mnt/iso/* /mnt/usb/
    

  11. Make USB flash drive bootable.

    # ms-sys -7 /dev/sdc
    

  12. Run sync to ensure all operations have completed.
    # 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}
    

Last update: August 23, 2020