A Microsoft Windows® *Loop device* installation media preparer for GNU+Linux https://woeusb.github.io/WoeUSB/
  • Shell 96.2%
  • Roff 3.8%
Find a file
2025-12-20 02:35:07 +09:00
.github docs: Fix grammar in release notes(improves -> improve) 2021-11-07 16:59:35 +08:00
.reuse lint: Split files with line continuation for readability 2021-11-08 04:05:11 +08:00
continuous-integration lint: Fix missing spacing between file description and copyright in header 2021-02-12 14:07:17 +08:00
dev-assets feat: Support I18N 2021-11-29 04:09:17 +08:00
distribution/standalone standalone: Improve file header 2021-03-02 05:48:45 +08:00
LICENSES legal: Fix improper handling of the Fairuse pseudo license 2021-03-21 17:06:39 +08:00
sbin Remodeled specifically for loop devices 2025-12-05 00:44:56 +09:00
share feat: Implement Taiwanese Chinese and Chinese Chinese localizations 2021-11-29 04:10:46 +08:00
.drone.yml ci: Update Drone CI configuration file from template 2021-03-02 06:20:19 +08:00
.editorconfig Update common configuration files 2021-03-02 05:56:35 +08:00
.gitattributes feat: Support I18N 2021-11-29 04:09:17 +08:00
.gitignore feat: Support I18N 2021-11-29 04:09:17 +08:00
.markdownlint.yml Update common configuration files 2021-03-02 05:56:35 +08:00
.pre-commit-config.yaml pre-commit: Import fixes from template 2021-03-02 05:52:38 +08:00
CONTRIBUTING.md feat: Support I18N 2021-11-29 04:09:17 +08:00
README.md mentioned original readme 2025-12-20 02:35:07 +09:00
README_ORIGINAL.md Added document for this project 2025-12-20 02:33:20 +09:00
SECURITY.md docs: Implement a (very limited) SECURITY.md 2025-09-12 15:03:56 +08:00
Vagrantfile dev: Implement Vagrantfile for ease testing on different Linux distributions 2021-05-23 22:30:17 +08:00

WoeUSBLoopDev

Also please take a look at the original WoeUSBs README file!

Why did I create this?

I was inspired to create this project after encountering a longstanding stall when I tried to write a Windows installer to a USB drive using the original WoeUSB. The stall appeared with the message “Installing for i386pc platform.” I realized that it would be faster to first write the Windows Installer image to a disk image file and then copy that disk image to the real USB stick using dd or pv, rather than writing directly to the USB stick. However, the original WoeUSB does not support writing to loop devices.

How it works

Linux kernels treat USB devices as SCSI devices, registering them with names such as /dev/sda or /dev/sdb. Partitions are then identified by appending a number, e.g. /dev/sda1.
In contrast, loop devices are named with numbers rather than letters, e.g. /dev/loop0 or /dev/loop1. Their partitions are identified with a “p” followed by a number, e.g. /dev/loop0p1.

WoeUSB assumes it is writing to a USB stick, so it operates with the SCSI device notation. It has a feature that determines whether the device passed to it is a partition or a whole device by simply checking whether the filename ends with a number. Because of this, it mistakenly treats a loop device as a partition. When it attempts to write to the loop device, it fails with an error.

Even if you comment out that implementation to bypass the check, the partition handling still relies on the “p(number)” convention, not just a trailing number. Therefore, if WoeUSB tries to operate on /dev/loop0p1, it actually attempts to manipulate /dev/loop01, resulting in another error.

This project fixes those issues and tailors the tool for writing to loop devices.

For the same reason, it should also work for writing a Windows installer to an NVMe SSD. NVMe devices are named like /dev/nvmeXnYpZ, where the partition is identified by the trailing “pZ”.

Use cases

  • Write to an image first, then copy that image to a USB stick. The long stall that occurs during GRUB installation should no longer happen.
  • Test a customized Windows installer (e.g., Tiny11) before actually writing it to USB stick. Write the installer to a disk image, attach that image as a virtual USB device in a VM, and boot the VM from it.
  • Write a Windows installer to an NVMe SSD. Experience an impressively fast Windows installation :)

Why is it “loopback only”?

Because its a hassle. If I had more time, I could have added a --loop option to switch between normal USB writing and loopback writing. I simply needed the functionality I required and am content with that. If you have spare time, you can fork this project or the original one and add such a feature yourself.

Why not name it “WoeLoop”?

To show respect for the developers of the original WoeUSB, who created such excellent software.