Thomas' Tech Tips

How to make bootable Windows 10 install USB from Linux

4 February 2024 - Thomas Damgaard

It is a bit tricky to make a bootable Windows 10 install USB on Linux, but with wimtools and ntfs-3g it is doable.

Prerequisites

Install required packages:

apt install ntfs-3g wimtools

Obtain Windows 10 installation iso from: https://www.microsoft.com/en-us/software-download/windows10ISO

Have a blank USB drive of at least 8 GB.

Making the bootable USB

The following assumes that the iso is in

/root/Win10_22H2_EnglishInternational_x64v1.iso

Run

mkdir /mnt/usb /mnt/windows

mount /dev/sdc1 /mnt/usb

mount -o loop Win10_22H2_EnglishInternational_x64v1.iso /mnt/windows10

rsync -avh --exclude=sources/install.wim /mnt/windows10/ /mnt/usb/

Check the size of install.wim:

ls -lh /mnt/windows10/sources/install.wim

If it is less than 4 GB, just copy the file over:

cp -v /mnt/windows10/sources/install.wim /mnt/usb/sources

If it is more than 4 GB, split the file using wimlib:

wimlib-imagex split /mnt/windows10/sources/install.wim /mnt/usb/sources/install.swm 3800


umount /mnt/usb

There are two ways: BIOS mode and UEFI mode.

UEFI mode

(untested)

Partition the disk using GPT

cgdisk /dev/sdc

Create one partition that spans the device.

Type NTFS.

BIOS mode

Partition the disk using MBR partitions

cfdisk /dev/sdc

Create one partition that spans the device.

Type NTFS.

mkfs.ntfs /dev/sdc1
Filed under: howto, linux, tips, windows

Back to article list