How To Make A Bootable Windows 10 USB On Linux Using The New WoeUSB

New WoeUSB command line

WoeUSB is no more. At least in its original form. The tool that's used to create bootable Windows USB drives from Linux has been split into a command line program called WoeUSB, which is under active development, and a GUI called WoeUSB-frontend-wxgtk that's currently unmaintained.

There's also an independent Python port of WoeUSB, called WoeUSB-ng, that's actively maintained.

The new WoeUSB, which is now just a command line tool, supports creating a bootable Windows USB drive from Linux with support for both Legacy PC and UEFI booting. The filesystem can be either FAT32 or NTFS, and the source can be a disk image or a physical installation disk. It's also wroth noting that WoeUSB supports non-ASCII filenames.

As for supported Windows installation images, WoeUSB supports Windows Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10, in any language or edition. Windows PE is also supported.

Easy to use alternative to WoeUSB: Create A Bootable USB Drive By Simply Copying The ISO To The USB With Ventoy (Linux And Windows)


How to install WoeUSB (command line tool)


The new WoeUSB has the following dependencies: Bash >= 4.3, Coreutils, util-linux, Grep and Gawk, Find Utilities, Parted, and Wget. p7zip is an optional dependency, required for example when the Windows 7 installation media doesn't ship with the USEFI bootloader in the proper location.

On Debian, Ubuntu, and Linux distributions based on these, like Pop!_OS, Linux Mint, Zorin OS, etc., you can install these dependencies by using (most are already installed, but just in case; I'm skipping some packages that are almost always installed, like Bash or Find):

sudo apt install coreutils util-linux gawk parted wget p7zip

Fedora:

sudo dnf install coreutils util-linux gawk parted wget p7zip

Arch Linux / Manjaro:

sudo pacman -S coreutils util-linux gawk parted wget p7zip

Now you can install the new, command line only WoeUSB somewhere in your PATH (the commands below download it and install it to /usr/local/bin):

wget https://raw.githubusercontent.com/WoeUSB/WoeUSB/master/sbin/woeusb -O /tmp/woeusb

sudo install /tmp/woeusb /usr/local/bin

Another command line tool that can create bootable USB drives from Linux and Windows ISO files is bootiso.

How to use WoeUSB command line tool to create a bootable Windows USB drive


1. To get started, plug the USB stick you want to use to create a bootable Windows installation, into your computer. Wait a couple of seconds, then use the command below to list all disks connected to your computer, including the USB drive:

sudo parted -l

Example with this command showing an USB drive attached to my computer:

$ sudo parted -l

..................................
Model:  USB DISK 3.0 Pro (scsi)
Disk /dev/sdd: 31.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 
Number  Start   End     Size    Type     File system  Flags
 1      1049kB  31.0GB  30.9GB  primary               boot
 2      31.0GB  31.0GB  33.6MB  primary  fat16        esp

In this example output you can find the USB device name by looking under Disk, so in this example's case it's /dev/sdd. The partitions are listed below the Disk Flags, so in this example you can see 2 partitions: 1 and 2 (and since the device name is /dev/sdd, the partitions are /dev/sdd1 and /dev/sdd2).

2. Unmount any mounted USB drive partitions

In case the USB drive you've just inserted was mounted, unmount it before proceeding using:

sudo umount /dev/sdXN

Replace /dev/sdXN with the USB device partitions (see step 1).

3. Create a bootable Windows drive from Linux using WoeUSB

There are 2 ways you can do this. The device creation method completely wipes the entire USB storage device, then build a bootable Windows USB device from scratch. The partition creation method copies the Windows ISO files to an existing partition (that you choose) of an USB storage device and make it bootable, only overwriting files that already exist under the same name on the USB.

To create a bootable Windows USB drive from Linux using WoeUSB in device mode, use:

sudo woeusb --device </path/to/Windows.iso> /dev/sdX --target-filesystem ntfs

Where:

  • --device specifies the device creation mode, "device" in this case
  • /path/to/Windows.iso - replace this with the path to the Windows ISO you want to use for the bootable USB media creation
  • /dev/sdX is the USB device you found out under step 1 (for example /dev/sdd).
  • --target-filesystem ntfs specifies to use NTFS as the target filesystem, instead of the default FAT32. Without this, you'll get into an error in most cases, saying that the source image has exceeded the FAT32 4GiB file size limitation, like this:  Error: File "/media/woeusb_source_1602672597_513603/sources/install.wim" in source image has exceed the FAT32 Filesystem 4GiB Single File Size Limitation and cannot be installed.  You must specify a different --target-filesystem.

Important: double-check that the USB device is correct before running the command! All the data on that drive will be lost!

To create a bootable Windows USB drive from Linux using WoeUSB in partition mode, use:

sudo woeusb --partition </path/to/Windows.iso> /dev/sdXN

Where:

  • --partition specifies to use the WoeUSB partition mode, which copies the Windows ISO files to an existing partition (that you choose) of an USB storage device and make it bootable, only overwriting files that already exist under the same name on the USB
  • /path/to/Windows.iso - replace this with the path to the Windows ISO you want to use for the bootable USB media creation
  • /dev/sdXN is the USB device partition to which you want to copy the Windows files to. You can find the device and partition by using sudo parted -l, as explained under step 1 (for example /dev/sdd1).

We're not specifying the partition target filesystem type when using WoeUSB in partition mode, because this only copies the files to a partition on the USB stick, so the partition is already supposed be NTFS.

Reminder: double-check that the USB device and partition are correct before running the command! All the data on that drive will be lost!

For more WoeUSB options, like specifying your own label for the newly created filesystem, apply a workaround for a BIOS bug that won't include the device in the boot menu if no partition has a boot flag toggled, and more, see the application help (woeusb --help).