Skip to main content
The 2024 Developer Survey results are live! See the results
command was buggy (the ISO is readonly, the folder needs to be created on the target for the boot.wim to be copied into that directory)
Source Link
sudo cp ~/tmp-win10-iso-mnt/* ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/boot ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/efi ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/support ~/tmp-win10-fat-usb-drive/
sudo mkdir ~/tmp-win10-iso-mnt/sources ~/tmp-win10-fat-usb-drive/sources 
sudo cp ~/tmp-win10-iso-mnt/sources/boot.wim ~/tmp-win10-fat-usb-drive/sources/
sudo cp ~/tmp-win10-iso-mnt/* ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/boot ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/efi ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/support ~/tmp-win10-fat-usb-drive/
sudo mkdir ~/tmp-win10-iso-mnt/sources ~/tmp-win10-fat-usb-drive/
sudo cp ~/tmp-win10-iso-mnt/sources/boot.wim ~/tmp-win10-fat-usb-drive/sources
sudo cp ~/tmp-win10-iso-mnt/* ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/boot ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/efi ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/support ~/tmp-win10-fat-usb-drive/
sudo mkdir ~/tmp-win10-fat-usb-drive/sources 
sudo cp ~/tmp-win10-iso-mnt/sources/boot.wim ~/tmp-win10-fat-usb-drive/sources/
Added variant B that works for mainboards that cannot boot from NTFS plus some cosmetic changes.
Source Link
Lirt
  • 391
  • 3
  • 5

Guide to prepare WindowsWindows 10 October 2018 release UEFI bootable USB drive on any Linux distribution.

Notice, that since Windows 10 October 2018 release has anthe installation file sources/install.wim is larger than the maximum FAT32 file size, so we will format USB drive to NTFS. Windows installer also cannot work with an EFI partition (code ef00), so we will use Microsoft basic data partition type (code 0700).

Variant A (For PCs with NTFS support)

  1. Insert USB drive to computer and make sure it is unmounted. Some distributions like to automount USB drives, so make sure you unmount them. Mounted partitions can be found with mount -l | grep '/dev/sdc', then unmount with sudo umount /dev/sdcX (Xwhere X is partition number).
  2. Open USB block device using gdisk /dev/sdc, configure it as GPT and create Microsoft basic data partition (code 0700), then write changes and quit (Next steps will destroy partition table in your USB drive!!!).
  1. Insert USB drive to new computer and boot from it.

Variant B (For PCs without NTFS support)

Steps for creating USB drive with name /dev/sdc (Replace all commands with YOUR device name!):

  1. Insert USB drive to computer and make sure it is unmounted. Some distributions like to automount USB drives, so make sure you unmount them. Mounted partitions can be found with mount -l | grep '/dev/sdc', then unmount with sudo umount /dev/sdcX (where X is partition number).
  2. Open USB block device using gdisk /dev/sdc
  3. Configure it as GPT
  4. Create first partition of 1GB size and type Microsoft basic data (code 0700).
  5. Create second partition of rest of the size and type Microsoft basic data (code 0700).
  6. Write changes and quit (Next steps will destroy partition table in your USB drive!!!).
sudo gdisk /dev/sdc
> o
> This option deletes all partitions and creates a new protective MBR.
> Proceed? (Y/N): y
> n
> Partition Number: Enter
> First sector: Enter
> Last sector: 1G
> Type: 0700
> n
> Partition Number: Enter
> First sector: Enter
> Last sector: Enter
> Type: 0700
> p
# Should print something like:
> Disk /dev/sdc: 30031250 sectors, 14.3 GiB
> Model: Ultra USB 3.0   
> Sector size (logical/physical): 512/512 bytes
> Disk identifier (GUID): C657C0AF-3FE2-4152-8BF1-CE3CCA9F3541
> Partition table holds up to 128 entries
> Main partition table begins at sector 2 and ends at sector 33
> First usable sector is 34, last usable sector is 30031216
> Partitions will be aligned on 2048-sector boundaries
> Total free space is 4061 sectors (2.0 MiB)

> Number  Start (sector)    End (sector)  Size       Code  Name
>    1            2048         2048000   999.0 MiB   0700  Microsoft basic data
>    2         2050048        30031216   13.3 GiB    0700  Microsoft basic data

w
> Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!!
> Do you want to proceed? (Y/N): y
q
  1. Format first partition as FAT32 and second as NTFS:
sudo mkfs.fat -F32 /dev/sdc1
sudo mkfs.ntfs -Q  /dev/sdc2
  1. Mount new USB partitions to temporary directories in your home:
mkdir ~/tmp-win10-fat-usb-drive
mkdir ~/tmp-win10-ntfs-usb-drive
sudo mount /dev/sdc1 ~/tmp-win10-fat-usb-drive
sudo mount /dev/sdc2 ~/tmp-win10-ntfs-usb-drive
  1. Download Windows installation ISO, create new temporary directory in your home and mount it there:
mkdir ~/tmp-win10-iso-mnt
sudo mount Win10_1809Oct_English_x64.iso ~/tmp-win10-iso-mnt
  1. Copy following files with from mounted ISO to FAT32 formatted USB drive (basically copy everything besides sources/ but include sources/boot.wim):
sudo cp ~/tmp-win10-iso-mnt/* ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/boot ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/efi ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/support ~/tmp-win10-fat-usb-drive/
sudo mkdir ~/tmp-win10-iso-mnt/sources ~/tmp-win10-fat-usb-drive/
sudo cp ~/tmp-win10-iso-mnt/sources/boot.wim ~/tmp-win10-fat-usb-drive/sources
  1. Copy everything from mounted ISO to NTFS formatted USB drive:
sudo cp -rT ~/tmp-win10-iso-mnt/ ~/tmp-win10-ntfs-usb-drive/
  1. Unmount Windows ISO and both USB partitions and remove temporary directories:
sudo umount ~/tmp-win10-iso-mnt/ ~/tmp-win10-usb-fat-drive/ ~/tmp-win10-usb-ntfs-drive/
rmdir ~/tmp-win10-iso-mnt/ ~/tmp-win10-usb-drive/
  1. Insert USB drive to new computer and boot from it.

Guide to prepare Windows 10 October 2018 release UEFI bootable USB drive on any Linux distribution.

Notice, that Windows 10 October 2018 release has an installation file sources/install.wim larger than the maximum FAT32 file size, so we will format USB drive to NTFS. Windows installer also cannot work with an EFI partition (code ef00), so we will use Microsoft basic data partition type (code 0700).

  1. Insert USB drive to computer and make sure it is unmounted. Some distributions like to automount USB drives, so make sure you unmount them. Mounted partitions can be found with mount -l | grep '/dev/sdc', then unmount with sudo umount /dev/sdcX (X is partition number).
  2. Open USB block device using gdisk /dev/sdc, configure it as GPT and create Microsoft basic data partition (code 0700), then write changes and quit (Next steps will destroy partition table in your USB drive!!!).
  1. Insert USB drive to new computer and boot from it.

Windows 10 October 2018 release UEFI bootable USB drive on any Linux distribution.

Notice, that since Windows 10 October 2018 release the installation file sources/install.wim is larger than the maximum FAT32 file size, so we will format USB drive to NTFS. Windows installer also cannot work with an EFI partition (code ef00), so we will use Microsoft basic data partition type (code 0700).

Variant A (For PCs with NTFS support)

  1. Insert USB drive to computer and make sure it is unmounted. Some distributions like to automount USB drives, so make sure you unmount them. Mounted partitions can be found with mount -l | grep '/dev/sdc', then unmount with sudo umount /dev/sdcX (where X is partition number).
  2. Open USB block device using gdisk /dev/sdc, configure it as GPT and create Microsoft basic data partition (code 0700), then write changes and quit (Next steps will destroy partition table in your USB drive!!!).
  1. Insert USB drive to new computer and boot from it.

Variant B (For PCs without NTFS support)

Steps for creating USB drive with name /dev/sdc (Replace all commands with YOUR device name!):

  1. Insert USB drive to computer and make sure it is unmounted. Some distributions like to automount USB drives, so make sure you unmount them. Mounted partitions can be found with mount -l | grep '/dev/sdc', then unmount with sudo umount /dev/sdcX (where X is partition number).
  2. Open USB block device using gdisk /dev/sdc
  3. Configure it as GPT
  4. Create first partition of 1GB size and type Microsoft basic data (code 0700).
  5. Create second partition of rest of the size and type Microsoft basic data (code 0700).
  6. Write changes and quit (Next steps will destroy partition table in your USB drive!!!).
sudo gdisk /dev/sdc
> o
> This option deletes all partitions and creates a new protective MBR.
> Proceed? (Y/N): y
> n
> Partition Number: Enter
> First sector: Enter
> Last sector: 1G
> Type: 0700
> n
> Partition Number: Enter
> First sector: Enter
> Last sector: Enter
> Type: 0700
> p
# Should print something like:
> Disk /dev/sdc: 30031250 sectors, 14.3 GiB
> Model: Ultra USB 3.0   
> Sector size (logical/physical): 512/512 bytes
> Disk identifier (GUID): C657C0AF-3FE2-4152-8BF1-CE3CCA9F3541
> Partition table holds up to 128 entries
> Main partition table begins at sector 2 and ends at sector 33
> First usable sector is 34, last usable sector is 30031216
> Partitions will be aligned on 2048-sector boundaries
> Total free space is 4061 sectors (2.0 MiB)

> Number  Start (sector)    End (sector)  Size       Code  Name
>    1            2048         2048000   999.0 MiB   0700  Microsoft basic data
>    2         2050048        30031216   13.3 GiB    0700  Microsoft basic data

w
> Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!!
> Do you want to proceed? (Y/N): y
q
  1. Format first partition as FAT32 and second as NTFS:
sudo mkfs.fat -F32 /dev/sdc1
sudo mkfs.ntfs -Q  /dev/sdc2
  1. Mount new USB partitions to temporary directories in your home:
mkdir ~/tmp-win10-fat-usb-drive
mkdir ~/tmp-win10-ntfs-usb-drive
sudo mount /dev/sdc1 ~/tmp-win10-fat-usb-drive
sudo mount /dev/sdc2 ~/tmp-win10-ntfs-usb-drive
  1. Download Windows installation ISO, create new temporary directory in your home and mount it there:
mkdir ~/tmp-win10-iso-mnt
sudo mount Win10_1809Oct_English_x64.iso ~/tmp-win10-iso-mnt
  1. Copy following files with from mounted ISO to FAT32 formatted USB drive (basically copy everything besides sources/ but include sources/boot.wim):
sudo cp ~/tmp-win10-iso-mnt/* ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/boot ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/efi ~/tmp-win10-fat-usb-drive/
sudo cp -r ~/tmp-win10-iso-mnt/support ~/tmp-win10-fat-usb-drive/
sudo mkdir ~/tmp-win10-iso-mnt/sources ~/tmp-win10-fat-usb-drive/
sudo cp ~/tmp-win10-iso-mnt/sources/boot.wim ~/tmp-win10-fat-usb-drive/sources
  1. Copy everything from mounted ISO to NTFS formatted USB drive:
sudo cp -rT ~/tmp-win10-iso-mnt/ ~/tmp-win10-ntfs-usb-drive/
  1. Unmount Windows ISO and both USB partitions and remove temporary directories:
sudo umount ~/tmp-win10-iso-mnt/ ~/tmp-win10-usb-fat-drive/ ~/tmp-win10-usb-ntfs-drive/
rmdir ~/tmp-win10-iso-mnt/ ~/tmp-win10-usb-drive/
  1. Insert USB drive to new computer and boot from it.
Added `-Q` argument to mkfs.ntfs to skip filling disk with 0.
Source Link
Lirt
  • 391
  • 3
  • 5
  1. Format new partition as NTFS (thx @Alex for -Q idea):
sudo mkfs.ntfs -Q /dev/sdc1
  1. Format new partition as NTFS:
sudo mkfs.ntfs /dev/sdc1
  1. Format new partition as NTFS (thx @Alex for -Q idea):
sudo mkfs.ntfs -Q /dev/sdc1
Source Link
Lirt
  • 391
  • 3
  • 5
Loading