Want to create an USB installer for Microsoft Windows, but only has a Linux PC (or server)? Here’s how to do the trick in Ubuntu, Arch, Fedora, and their based systems, e.g., Linux Mint, Manjaro.
WoeUSB-ng
Today when I was installing Windows 7 on my 10 years old laptop, the first I tried is booting the ISO image via Ventoy USB stick. Sadly, it just didn’t boot!
So, I turned to WoeUSB-ng. It’s a free open-source tool to create a Windows USB stick installer from a real Windows DVD or iso image.
It’s a rewrite of WoeUSB in Python programming language with graphical interface support! With it, you can burn Windows Vista, Windows 7, Window 8.x, Windows 10 and Windows PE into USB with following boot mode:
- Legacy/MBR-style/IBM PC compatible bootmode
- Native UEFI boot for Windows 7 and later (FAT file-system only).
Step 1: Install WoeUSB-ng
Arch Linux users just need to run yay -S woeusb-ng
command in terminal to install the app.
1.) Install Dependency
Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to install the dependencies:
sudo apt install git p7zip-full python3-pip python3-wxgtk4.0 grub2-common grub-pc-bin
Type user password for sudo authentication, though there’s no asterisk feedback
For Fedora, run the command below instead:
sudo dnf install git p7zip p7zip-plugins python3-pip python3-wxpython4
2.) Install WoeUSB-ng
As a Python application, it’s easy to install via the pip package manager. To do so, just run command:
sudo pip3 install WoeUSB-ng
Due to policy change, the command above does no longer work in Ubuntu 24.04, see this post for workarounds, or just run the command below instead:
sudo pip3 install WoeUSB-ng --break-system-package
Once installed, click the top-left “Activities” button, then search for and open the tool:
Step 2: Create Windows USB Installer via WoeUSB-ng
Firstly, you need to download the Windows ISO image or insert the CD/DVD drive, plug in your USB stick (8GB+ is recommended).
Then, launch WoeUSB-ng from start menu, select your ISO image or CD/DVD drive and highlight the USB stick (click “Refresh”) if not in list.
Before clicking the “Install” button, backup your data in the USB stick. It by default formats the drive into FAT, though you can select “NTFS” in options.
After clicking “Install” and confirm in pop-up dialog, it will open a new small dialog indicates the installing process.
If everything goes OK, it should prompt “Installation Succeed” when done. Plug the USB stick in target machine and select boot it in BIOS or UEFI, and enjoy!
Create USB Windows Installer from command line
Running Linux without a desktop session? The tool also has command line options to do the job.
Firstly, find out the USB stick device name (usually /dev/sdb
) via command:
sudo fdisk -l
Then, run the command to create installer from iso image (run woeusb -h
to get more options):
sudo woeusb --device /PATH/TO/ISO /dev/sdb
And for BIOS boot, it’s better to add ‘–workaround-bios-boot-flag’ to workaround BIOS bug that won’t include the device in boot menu.
Uninstall WoeUSB-ng
To remove the application, open terminal and run the command:
sudo pip3 uninstall WoeUSB-ng
Then clear the shortcut icon via command:
sudo rm /usr/share/applications/WoeUSB-ng.desktop