LinuxCommandLibrary

woeusb

Create bootable Windows USB drive from Linux

TLDR

Format a USB then create a bootable Windows installation drive

$ woeusb --device [path/to/windows.iso] [/dev/sdX]
copy

Copy Windows files to an existing partition of a USB storage device and make it bootable, without erasing the current data
$ woeusb --partition [path/to/windows.iso] [/dev/sdXN]
copy

SYNOPSIS

woeusb [options] <source> <target>

PARAMETERS

--device <device>
    Create a bootable USB drive by formatting the entire specified device (e.g., /dev/sdX).

--partition <partition>
    Create a bootable Windows installation on an existing partition (e.g., /dev/sdXN), preserving other partitions on the disk.

--target-filesystem <filesystem>
    Specify the target filesystem for the USB drive (e.g., NTFS, FAT32). The default is typically NTFS for larger Windows images.

--label <label>
    Set a custom volume label for the target USB drive.

--no-grub-efi
    Do not install the GRUB EFI bootloader for UEFI boot. Use this option if you encounter boot issues or prefer other boot methods.

--wimlib-imagex
    Force the use of wimlib-imagex for handling install.wim files, which can sometimes resolve issues with large files.

--verbose, --debug
    Increase verbosity or enable debug output, providing more detailed information about the process.

--help
    Display a comprehensive help message and exit.

--version
    Display version information of woeusb and exit.

<source>
    Path to the Windows ISO image file (e.g., /path/to/windows.iso) or a directory containing extracted Windows installation files.

<target>
    Path to the target USB device (e.g., /dev/sdX) or partition (e.g., /dev/sdXN). Use extreme caution when specifying the target to avoid data loss.

DESCRIPTION

WoeUSB is a free and open-source utility for Linux that enables users to create a bootable Windows installation USB stick from an ISO image or a DVD. It supports both legacy BIOS and UEFI boot modes, making it versatile for various systems. Essentially, it takes a Windows ISO file and prepares a USB drive so that it can be used to install Windows onto a computer. WoeUSB handles the necessary formatting, copying of files, and setting up the bootloader, simplifying a task that can otherwise be complex. It is particularly useful for Linux users who need to create Windows installation media without resorting to a Windows machine. WoeUSB is a continuation of the WinUSB project, providing ongoing support and development for this crucial functionality.

CAVEATS

Data Loss Risk: Using the --device option will completely erase all data on the specified USB drive. Ensure you select the correct target device (e.g., /dev/sdb, not /dev/sda) to prevent accidental data loss on your system's hard drive.
Root Privileges: WoeUSB requires root privileges to access and format USB devices. It must be run with sudo (e.g., sudo woeusb ...) or as the root user.
Windows ISO Compatibility: While generally compatible, some highly customized or non-standard Windows ISOs might not work as expected. Ensure you are using an official or well-known Windows ISO.
Time Consumption: The process can take a significant amount of time depending on the size of the ISO, the speed of the USB drive, and the host system's performance.

USAGE MODES

WoeUSB primarily supports two distinct usage modes:

Device Mode: woeusb --device <iso_path> <target_device>
This is the most common and recommended mode. It will format the entire specified USB device and prepare it to be bootable. This method ensures a clean and compatible installation.

Partition Mode: woeusb --partition <iso_path> <target_partition>
This mode allows installing Windows onto an existing partition on a USB drive, leaving other partitions on the same disk intact. While flexible, it requires careful handling to ensure the target partition is correctly identified and is suitable for Windows installation (e.g., sufficiently large and formatted correctly).

HISTORY

WoeUSB originated as a fork of the popular WinUSB project, which ceased active development. Faced with the ongoing need for a reliable tool to create bootable Windows USB drives from Linux, developers picked up the mantle, leading to the creation of WoeUSB. This initiative ensures continued compatibility with newer Windows versions and various Linux distributions, providing a vital utility for dual-booters, system administrators, and anyone needing to prepare Windows installation media from a Linux environment.

SEE ALSO

dd(1), mkusb(1), unetbootin(1), ventoy(1), fdisk(8), gparted(8)

Copied to clipboard