Thursday, July 4, 2024
HomeOperating SystemsCentosCreate Windows 10 bootable USB on Linux

Create Windows 10 bootable USB on Linux

Create Windows 10 bootable USB on Linux: Want to create a bootable USB stick for Windows 10 on your Linux box?. This has been made simple by WoeUSB. WoeUSB is a simple tool that enables you to create your own USB stick windows installer from an iso image or a real DVD. This project is a fork of Congelli501’s WinUSB software, which has not been maintained since 2012, according to the official website.

WoeUSB package contains two programs:

  • woeusbgui:  A GUI wrapper of woeusb based on WxWidgets
  • woeusb: A command-line utility that enables you to create your own bootable Windows installation USB storage device from an existing Windows Installation disc or disk image.

WoeUSB supports the following Windows images:

  1. Windows Vista
  2. Windows 7, 8 and 10

 Method 1: Install WoeUSB-ng on Linux using pip3

Follow below steps to get WoeUSB running on your Linux box. This is a prerequisite before you can create windows 10 bootable USB on Linux

Arch Linux / Manjaro

Install yay tool:Install yay – Best AUR Helper for Arch Linux / Manjaro

Use yay to install WoeUSB on Arch Linux:

yay -S woeusb-ng

Or via pip3 package manager:

sudo pacman -Suy p7zip python-pip python-wxpython
sudo pip3 install WoeUSB-ng

Ubuntu Linux systems

For Ubuntu, start with the installation of dependencies:

sudo apt update
sudo apt install git p7zip-full python3-pip python3-wxgtk4.0 grub2-common grub-pc-bin

After dependencies installation, install WoeUSB-ng using pip package manager:

sudo pip3 install WoeUSB-ng

Fedora

For Fedora, install WoeUSB using the following command.

sudo dnf install git p7zip p7zip-plugins python3-pip python3-wxpython4
sudo pip3 install WoeUSB-ng

Method 2: Install WoeUSB-ng on Linux from source

Install dependencies required:

### Ubuntu ###
sudo apt update
sudo apt install git p7zip-full python3-pip python3-wxgtk4.0 grub2-common grub-pc-bin

### Fedora ####
sudo dnf install git p7zip p7zip-plugins python3-pip python3-wxpython4

### Arch based systems ###
sudo pacman -Suy p7zip python-pip python-wxpython

Then clone project and installWoeUSB-ng from source:

git clone https://github.com/WoeUSB/WoeUSB-ng.git
cd WoeUSB-ng
sudo pip3 install .

After you get WoeUSB installed, you are on set to create windows 10 bootable USB on Linux. Here you have two options, one of them being to use a command line and the other one being to use a GUI version.

I’ll show you both of the methods you can use to create Windows 10 bootable USB on Linux.

Create Windows 10 bootable USB on Linux

Launch the GUI version of WoeUSB tool.

sudo woeusbgui

This will bring you an interface similar to one below:

create windows 10 bootable USB on Linux

Then select Windows 10 ISO image file and click on the correct target device listed at the bottom of the screen.

create windows 10 bootable USB on Linux

Click on Install button at the bottom of the screen to create windows 10 bootable USB on Linux.

create windows 10 bootable USB on Linux

Wait for the installation to finish. You should get a complete message like one shown below:

create windows 10 bootable USB on Linux

Using command line woeusb

Using the command line woeusb to create windows 10 bootable USB on Linux will require you to provide iso image location and USB device as command line options. See example below which will create windows 10 bootable USB on Linux using 32-bit version of Windows 10 to USB stick on /dev/sdb.

sudo woeusb --device <source media path> <device>

In my case, this will be:

$ sudo woeusb --device win_10_rs3_aio_1709.16299.251_x64.iso /dev/sda
WoeUSB v@@WOEUSB_VERSION@@
==============================
Mounting source filesystem...
Wiping all existing partition table and filesystem signatures in /dev/sda...
/dev/sda: 5 bytes were erased at offset 0x00008001 (iso9660): 43 44 30 30 31
/dev/sda: 2 bytes were erased at offset 0x000001fe (dos): 55 aa
/dev/sda: 2 bytes were erased at offset 0x00000000 (mac): 45 52
/dev/sda: calling ioctl to re-read partition table: Success
Ensure that /dev/sda is really wiped...
Creating new partition table on /dev/sda...
Creating target partition...
Making system realize that partition table has changed...
Wait 3 seconds for block device nodes to populate...
mkfs.fat 4.1 (2017-01-24)
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
Mounting target filesystem...
Applying workaround to prevent 64-bit systems with big primary memory from being unresponsive during copying files.
Copying files from source media...
grep: /media/woeusb_source_1530817244_30290/sources/cversion.ini: No such file or directory
Installing GRUB bootloader for legacy PC booting support...
Installing for i386-pc platform.
Installation finished. No error reported.
Installing custom GRUB config for legacy PC booting...
Resetting workaround to prevent 64-bit systems with big primary memory from being unresponsive during copying files.
Unmounting and removing "/media/woeusb_source_1530817244_30290"...
Unmounting and removing "/media/woeusb_target_1530817244_30290"...
You may now safely detach the target device
Done 🙂
The target device should be bootable now

If your Windows ISO image is bigger than 4GB, you’ll need to use NTFS filesystem in the USB device.

sudo woeusb --device Windows-10-Pro-X64-Pre-Activated.iso /dev/sdb \
--target-filesystem ntfs

Sample output:

WoeUSB v@@WOEUSB_VERSION@@
==============================
Mounting source filesystem...
Wiping all existing partition table and filesystem signatures in /dev/sdb...
/dev/sdb: 2 bytes were erased at offset 0x000001fe (dos): 55 aa
/dev/sdb: calling ioctl to re-read partition table: Success
Ensure that /dev/sdb is really wiped...
Creating new partition table on /dev/sdb...
Creating target partition...
Making system realize that partition table has changed...
Wait 3 seconds for block device nodes to populate...
Cluster size has been automatically set to 4096 bytes.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.
--2018-11-24 08:40:15--  https://github.com/pbatard/rufus/raw/master/res/uefi/uefi-ntfs.img
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving github.com (github.com)... 140.82.118.4, 140.82.118.3, 64:ff9b::8c52:7603, ...
Connecting to github.com (github.com)|140.82.118.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/pbatard/rufus/master/res/uefi/uefi-ntfs.img [following]
--2018-11-24 08:40:17--  https://raw.githubusercontent.com/pbatard/rufus/master/res/uefi/uefi-ntfs.img
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.140.133, 64:ff9b::9765:8c85
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.140.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 524288 (512K) [application/octet-stream]
Saving to: ‘/tmp/WoeUSB.YZlT6n.tempdir/uefi-ntfs.img’

uefi-ntfs.img                         100%[========================================================================>] 512.00K   451KB/s    in 1.1s    

2018-11-24 08:40:19 (451 KB/s) - ‘/tmp/WoeUSB.YZlT6n.tempdir/uefi-ntfs.img’ saved [524288/524288]

1024+0 records in
1024+0 records out
524288 bytes (524 kB, 512 KiB) copied, 0.173849 s, 3.0 MB/s
Mounting target filesystem...
Applying workaround to prevent 64-bit systems with big primary memory from being unresponsive during copying files.
Copying files from source media...
Installing GRUB bootloader for legacy PC booting support...
Installing for i386-pc platform.
Installation finished. No error reported.
Installing custom GRUB config for legacy PC booting...
Resetting workaround to prevent 64-bit systems with big primary memory from being unresponsive during copying files.
Unmounting and removing "/media/woeusb_source_1543038005_16819"...
Unmounting and removing "/media/woeusb_target_1543038005_16819"...
You may now safely detach the target device
Done 🙂
The target device should be bootable now

Once finished, you’re good to go. Go ahead and use windows 10 bootable USB to make an installation on your PC.

Thank you for reading this post on how to create Windows 10 bootable USB on Linux. Hope this was helpful.

Thapelo Manthata
I’m a desktop support specialist transitioning into a SharePoint developer role by day and Software Engineering student by night. My superpowers include customer service, coding, the Microsoft office 365 suite including SharePoint and power platform.
RELATED ARTICLES

Most Popular

Recent Comments