How to make a bootable Windows 10 USB on Linux with the new WoeUSB

USB flash drive no longer. At least in its original form.The tool used to create bootable Windows USB drives from Linux has been split into a command line program called USB flash drive, It is under active development, the GUI is named WoeUSB front end-wxgtk Currently not maintained.

There is also a separate WoeUSB Python port called Flash drive, This is actively maintained.

The new WoeUSB is now just a command line tool that supports the creation of bootable Windows USB drives from Linux, and supports both Legacy PC and UEFI booting. The file system can be FAT32 or NTFS, and the source can be a disk image or a physical installation disk. It is also angry to point out that WoeUSB supports non-ASCII file names.

As for the supported Windows installation images, WoeUSB supports Windows Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 in any language or version. Windows PE is also supported.

An easy-to-use alternative to WoeUSB: Simply copy the ISO to the USB using Ventoy (Linux and Windows) to create a bootable USB drive

The new WoeUSB has the following dependencies: Bash>= 4.3, Coreutils, util-linux, Grep and Gawk, Find Utilities, Parted and Wget. p7zip is an optional dependency, for example, when the Windows 7 installation media is not provided with the USEFI bootloader, p7zip is required in the appropriate location.

On Debian, Ubuntu and Linux distributions based on these (such as Pop!_OS, Linux Mint, Zorin OS, etc.), you can install these dependencies by using (most of them are already installed, but just in case; I skipped Some packages are almost always installed, such as Bash or Find):

sudo apt install coreutils util-linux gawk parted wget p7zip

Fedora:

sudo dnf install coreutils util-linux gawk parted wget p7zip

Arch Linux / Manjaro:

sudo pacman -S coreutils util-linux gawk parted wget p7zip

Now you can only install the new command line USB flash drive A location in the PATH (the following command will download and install it into /usr/local/bin):

wget https://raw.githubusercontent.com/WoeUSB/WoeUSB/master/sbin/woeusb -O /tmp/woeusb

sudo install /tmp/woeusb /usr/local/bin

Another command line tool that can create bootable USB drives from Linux and Windows ISO files is bootiso.

How to create a bootable Windows USB drive using WoeUSB command line tool

1. First, insert the USB flash drive that will be used to create a bootable Windows installation into the computer. Wait a few seconds, and then use the following command to list all disks connected to the computer, including USB drives:

sudo parted -l

An example of this command shows a USB drive connected to my computer:

$ sudo parted -l

..................................Model:  USB DISK 3.0 Pro (scsi)Disk /dev/sdd: 31.0GBSector size (logical/physical): 512B/512BPartition Table: msdosDisk Flags: Number  Start   End     Size    Type     File system  Flags 1      1049kB  31.0GB  30.9GB  primary               boot 2      31.0GB  31.0GB  33.6MB  primary  fat16        esp

In this example output, you can find the USB device name in the following ways: Disk, So in this case /dev/sdd.The partitions are listed below Disk Flags, So in this example, you can see 2 partitions: 1 and 2 (and since the device name is /dev/sdd, The partition is /dev/sdd1 with /dev/sdd2).

2. Uninstall all installed USB drive partitions

If the USB drive you just inserted is already installed, please uninstall it before continuing to use it:

sudo umount /dev/sdXN

replace /dev/sdXN Partition the USB device (see step 1).

3. Use WoeUSB to create a bootable Windows drive from Linux

There are two ways to do this. The device creation method will completely erase the entire USB storage device and then build a bootable Windows USB device from scratch. The partition creation method copies the Windows ISO file to the existing partition of the USB storage device (the partition you choose) and makes it bootable, only overwriting the files that exist on the USB with the same name.

To create a bootable Windows USB drive from Linux using WoeUSB in device mode, use:

sudo woeusb --device </path/to/Windows.iso> /dev/sdX --target-filesystem ntfs

where:

  • --device Specify the device creation mode, in this case “device”
  • /path/to/Windows.iso -Replace it with the Windows ISO path you want to use for bootable USB media creation
  • /dev/sdX Is the USB device you found in step 1 (e.g. /dev/sdd).
  • --target-filesystem ntfs Specifies to use NTFS as the target file system instead of the default FAT32. Without this setting, in most cases you will get an error saying that the source image has exceeded the FAT32 4GiB file size limit, as shown below: Error: File "/media/woeusb_source_1602672597_513603/sources/install.wim" in source image has exceed the FAT32 Filesystem 4GiB Single File Size Limitation and cannot be installed.  You must specify a different --target-filesystem.

Important: Before running the command, please double check whether the USB device is correct! All data on this drive will be lost!

To create a bootable Windows USB drive from Linux using WoeUSB in partition mode, use:

sudo woeusb --partition </path/to/Windows.iso> /dev/sdXN

where:

  • --partition Specify the WoeUSB partition mode, which copies the Windows ISO file to the existing partition of the USB storage device (the one you choose) and makes it bootable, only overwriting the file with the same name that already exists on the USB
  • /path/to/Windows.iso -Replace it with the Windows ISO path you want to use for bootable USB media creation
  • /dev/sdXN Is the partition of the USB device to which Windows files are copied.You can find devices and partitions using sudo parted -l, As described in step 1 (for example /dev/sdd1).

When using WoeUSB in partition mode, we did not specify the partition target file system type, because this will only copy files to the partition on the USB memory stick, so the partition has been assumed to be NTFS.

Reminder: Before running the command, please carefully check whether the USB device and partition are correct! All data on this drive will be lost!

For more WoeUSB options, such as assigning your own label to the newly created file system, please take a solution to the BIOS error. If no partition is switched to the boot logo, the BIOS error will not include the device in the boot menu. For more information, please refer to the application help. (woeusb --help).

Source

Sidebar