sodcalculator

10 Tech How-To

Create Windows Installer USB Linux: Full Guide

Guide 10-46666 · Updated · Step by step

To create a Windows installer USB from Linux, you need a tool that writes the Windows ISO to a USB drive in a bootable format, since simply copying files or using dd often fails. The most reliable method is using WoeUSB or Ventoy, both of which handle the Windows boot files correctly. This guide walks you through both approaches, explains why the standard Linux USB tools fail, and covers common pitfalls.

Why Standard Linux USB Tools Fail with Windows ISOs

Most Linux users are familiar with tools like dd, balenaEtcher, or Rufus (via Wine) for creating bootable Linux USBs. These tools write the ISO image directly to the drive, sector by sector. This works perfectly for Linux ISOs because they are designed as hybrid images—they contain both an ISO 9660 filesystem and a master boot record (MBR) that allows them to boot from USB.

Windows ISOs, however, are not hybrid images. They are pure ISO files meant to be burned to a DVD or extracted to a USB with a special bootloader. When you dd a Windows ISO to a USB, the drive ends up with a filesystem that most PCs cannot boot from, or it boots into a black screen. The Windows installation media also requires specific files (like bootmgr and the sources folder) to be placed in the root of a FAT32 or NTFS partition, which a raw image write does not do.

Method 1: Using WoeUSB (Command Line and GUI)

WoeUSB is a dedicated tool for creating Windows installer USBs from Linux. It extracts the ISO contents and sets up the bootloader correctly. The original WoeUSB project was abandoned, but a community fork called WoeUSB-ng is actively maintained.

  1. Install dependencies: On Debian/Ubuntu, install git, p7zip-full, python3-pip, and wget. On Fedora, use dnf install git p7zip python3-pip wget.
  2. Install WoeUSB-ng: Run pip3 install WoeUSB-ng. You may need to use pip3 install --user if you lack root permissions.
  3. Run the GUI (optional): The command woeusbgui launches a graphical interface. Select your Windows ISO, choose the target USB drive, and click Install.
  4. Use the command line (more reliable): Unmount the USB drive first (umount /dev/sdX1), then run:
    sudo woeusb --device /path/to/windows.iso /dev/sdX
    Replace /dev/sdX with your USB device (e.g., /dev/sdb).

WoeUSB formats the USB as NTFS by default, which is required for Windows ISOs larger than 4 GB (FAT32 has a 4 GB file size limit). If your ISO is under 4 GB, it may use FAT32 for better compatibility with older UEFI systems.

Method 2: Using Ventoy (Multi-ISO Tool)

Ventoy is an open-source tool that turns your USB into a bootable drive that can hold multiple ISO files. You install Ventoy once, then simply copy ISO files to the USB. It works with Windows and Linux ISOs alike, making it a great all-in-one solution.

  1. Download Ventoy: Get the Linux tarball from the official GitHub releases page.
  2. Extract and run: tar -xzf ventoy-x.x.x-linux.tar.gz then cd ventoy-x.x.x and run sudo sh Ventoy2Disk.sh -i /dev/sdX (replace /dev/sdX with your USB).
  3. Copy the Windows ISO: After installation, the USB appears as a normal storage drive. Just copy your Windows.iso file to it.
  4. Boot: When you boot from the USB, Ventoy shows a menu of all ISO files; select the Windows one and it loads.

Ventoy is generally more forgiving than WoeUSB because it handles the boot process itself, rather than relying on the USB being formatted in a specific way. It also supports secure boot if you enable the option during installation.

Choosing Between WoeUSB and Ventoy

Both tools work, but they have different strengths:

  • WoeUSB creates a single-purpose Windows installer USB. It is the closest to what you would get from Microsoft’s Media Creation Tool. It is ideal if you only need Windows and want a clean, standard result.
  • Ventoy is better if you frequently install different operating systems. You can keep a Windows ISO, a Linux ISO, and a rescue disk all on one USB. It also survives re-writing: you can delete and add ISOs without re-installing Ventoy.
  • If WoeUSB fails (it sometimes does with newer Windows ISOs), Ventoy is the recommended fallback.

Common Problems and Fixes

Even with the right tools, you may hit issues. Here are the most frequent ones:

  • “Target device is not a removable disk” error: This happens when the USB is mounted. Unmount it first with umount /dev/sdX* and try again.
  • USB not booting after creation: Check your BIOS/UEFI boot order. You may need to disable Secure Boot (temporarily) or enable “Legacy USB” support. Also, try a different USB port (preferably USB 2.0 on the back of the PC).
  • Windows setup says “A media driver your computer needs is missing”: This usually means the USB is formatted as exFAT or NTFS and the Windows installer cannot read it during early boot. Re-create the USB with WoeUSB using FAT32 (if the ISO is under 4 GB) or use Ventoy with its “Ventoy Compatible” option.
  • USB drive becomes read-only: Some cheap USB drives have a physical write-protect switch. Check the side of the drive. If not, try a different USB port or drive.
  • WoeUSB fails with “unsupported file system”: The target USB must be unmounted and have a valid partition table. Use sudo wipefs -a /dev/sdX to erase it completely before running WoeUSB.

Alternative: Using the Windows ISO Directly (No Tool)

If you have a Windows ISO that is smaller than 4 GB, you can manually create a bootable USB without any special software:

  1. Format the USB as FAT32 (using mkfs.fat /dev/sdX1).
  2. Mount the Windows ISO: sudo mount -o loop windows.iso /mnt/iso.
  3. Copy all files to the USB: cp -r /mnt/iso/* /media/usb/.
  4. Unmount both.

This works because Windows ISOs contain a bootmgr file and a sources folder that the UEFI firmware can find directly. However, this only works for UEFI-based PCs (most modern ones). For legacy BIOS, you need the bootsect.exe tool, which is not available on Linux. If you have a UEFI system, this manual method is the simplest and most reliable.

Costs and Safety Considerations

All the tools mentioned are free and open-source. The only cost is the USB drive itself. A 16 GB USB is sufficient for any Windows ISO, but 32 GB is safer for future updates. There are no licensing issues: you are creating installation media from a legitimate Windows ISO you downloaded from Microsoft.

Safety-wise, be careful when writing to /dev/sdX. Double-check the device name with lsblk before running any command, as writing to the wrong drive can erase your entire Linux installation. Always unmount the USB first, and never write to a drive that is currently mounted as your root filesystem.

Frequently Asked Questions

Can I use the same USB for both Windows and Linux installation?

Yes, with Ventoy you can store both a Windows ISO and a Linux ISO on the same USB. When you boot, Ventoy presents a menu to choose which one to load. WoeUSB, on the other hand, creates a single-purpose drive, so you would need a separate USB for Linux.

Is it safe to use dd to write a Windows ISO?

No, it rarely works. Windows ISOs are not hybrid images, so dd will copy the ISO as a raw image, which most computers cannot boot. You will likely see a “No bootable device” error. Use WoeUSB or Ventoy instead.

Why does my USB work on one PC but not another?

This is usually a UEFI vs. Legacy BIOS issue. If you created the USB with FAT32, it should work on UEFI systems. For older BIOS systems, you need an NTFS-formatted USB with the correct bootloader. WoeUSB handles this automatically, but manual creation may not.

What is the difference between FAT32 and NTFS for Windows installer USBs?

FAT32 is compatible with all UEFI systems but has a 4 GB file size limit. Windows ISOs larger than 4 GB (common for Windows 10/11) must use NTFS or exFAT. However, some older UEFI systems cannot boot from NTFS. Ventoy solves this by using its own bootloader that can read both filesystems.

Can I create a Windows installer USB on a Raspberry Pi running Linux?

Yes, as long as you have a USB port and the ARM version of Linux. The tools (WoeUSB, Ventoy) are architecture-independent. However, the USB drive must be at least 8 GB, and the process is the same as on a desktop.

Do I need a Windows PC to download the Windows ISO?

No, Microsoft provides official Windows ISO downloads for free. You can download them from the Microsoft website using any operating system, including Linux. Just select the Windows version and edition you need.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →