[root tip] [How To] Use Manjaro to create a bootable Windows USB

Creating a bootable USB from a Windows ISO


The reason for needing this could be e.g. reinstalling Windows but it could also be to update your system firmware - because the vendor only provided Windows binaries - you need a Windows system.

To update you system firmware you can use a Windows PE environment like Hiren’s BootCD Hirens BootCD

If you want to reinstall Windows after your Manjaro adventure get a Windows ISO from Microsoft

Topics covered


  1. Using woeusb
  2. Using ventoy
  3. Using terminal

WoeUSB


WoeUSB (AUR) is the unsurpassed tool to write a Windows ISO to USB

Build from AUR using Add/Remove Software

  1. Open the GUI package manager - if AUR is not enabled - enable AUR.
  2. Search for woeusb and build the package.
  3. Launch WoeUSB from the menu system.

Build using terminal

$ pamac build woeusb

Flashing your device

Flash your device takes this form

$ sudo woeusb --device <path-to-iso> <device>

So if you USB is in your downloads folder named Win10.iso and your device is /dev/sdy the command would be

$ sudo woeusb --device ~/Downloads/Win10.iso /dev/sdy

Wait for the result - woeusb will print informational messages when done.

ventoy


2020-05-09T10:35:00Z
The ventoy utility is a great tool for booting a Windows ISO without having to jump through the hoops in this guide.

Install the ventoy package from repo

$ sudo pacman -S ventoy

Locate your USB stick

$ lsblk

Partition schema used

@stephane was so kind to remind of the possibility of reserving disk space and the choice of using either MBR og GPT.

ventoy supports both MBR style and GPT style partition table. If you choose one over the other depends on your use case - most notably the number of partitions on the device. If you plan to extend the device with more than two partitions it is recommended to use GPT.

For MBR style partition schema (default) (replace sdy below with your device)

$ sudo ventoy -i /dev/sdy

For GPT style partition schema

$ sudo ventoy -i -g /dev/sdy

Reserved space

If you want to use the disk as a leave-no-trace system using the ISO as a readonly system - you may want to create one or more partitions to hold your data. As ventoy defaults to use the entire disk the installer has the option to reserve a part of the USB for adding more partitions.

The size of the reserved space is set in MB so to reserve 8G on a 32G stick for more than two partitions use (8x1024MB=8192MB)

$ sudo ventoy -i -g -r 8192 /dev/sdy

You can later use e.g. gparted or another partitioning tool to create the extra partition(s) - and encrypt then if you desire so.

Using a file manager

Using your file manager and drag your Windows ISO onto you USB and wait - patience is the keyword - patience.

When the copy operation is done - use the eject button in your file manager - and wait - wait until the device disappears from your file manager.

:exclamation: If you don’t wait - data corruption will occur - and you don’t want that.

ventoy command line

Using the device name from above mount the first partition to a temporary mount point

$ sudo mount /dev/sdy1 /mnt

Copy the ISO file to the USB - assuming the ISO is in your Downloads folder

$ cp ~/Downloads/<windows.iso> /mnt && sync

When the command finishes you can unmount the device

$ sudo umount /mnt

:exclamation: If you don’t wait - data corruption will occur - and you don’t want that.

Terminal


Remove all removable devices (USB), open a terminal and list known disk devices

$ lsblk -la

Insert your USB stick and list your devices one more time

$ lsblk -la

Make a note of the extra device listed. If you only have one disk then it probably will be /dev/sdb.

Please do double check the device id

In the terminal clear the disk of any partition info, using this command (replace sdy with device letter from above).

$ sudo dd if=/dev/zero of=/dev/sdy bs=1M count=10 oflag=sync

Then use fdisk to create the filesystem needed for the Windows ISO (replace X with device letter from above).

$ sudo fdisk /dev/sdy

The commands in fdisk is as follows

  1. o - create a new empty DOS partition table
  2. n - add a new partition
  3. Enter - accept default partition type primary
  4. Enter - accept default partition number 1
  5. Enter - accept default first sector 2048
  6. Enter - accept default last sector
  7. t - change partition type
  8. 07 - select HPFS/NTFS/exFAT
  9. a - set bootable flag for partition 1
  10. w - write changes to disk

Newer versions of Windows 10 ISO contains a file bigger than 4G. Format the device using ntfs (replace sdy with device letter from above) to overcome the size limitation of FAT32.

$ sudo mkfs.ntfs /dev/sdX1

Create a folder to mount your ISO

$ mkdir ~/winiso

Mount your ISO

$ sudo mount -o loop /path/to/windows/iso/filename.iso ~/winiso

Create a folder to mount your USB

$ mkdir ~/winusb

Mount the partition (replace sdy with device letter from above)

$ sudo mount /dev/sdy1 ~/winusb

Copy all files from ISO to USB

$ cd ~/winiso
$ cp -r * ~/winusb

The copy operation is going to take a long time depending on your USB port speed and your USB device.

When the copy is done ensure all data is flushed to the device using the sync command

$ sync

When all data is flushed to the device you will be returned to the prompt.
Next thing is to move out of the winiso folder

$ cd

Then unmount the devices

$ sudo umount ~/winiso ~/winusb

Remove the folders

$ rm -rf ~/winiso ~/winusb

You should now be able to boot to your Windows install media.

Revision

  • Transferred from original post[1]
  • Added ventoy
  • Newer Windows media includes a wim file larger than 4GB
    • format to exfat or ntfs to be able to use with WoeUSB
  • Fixed recursive flag on cleanup command
14 Likes

Hi,

I have been planning to Install Win10 on another disk just for gaming Apex and BF4 and Adobe stuff (keeping Manjaro as my main) and I assumed that tha simple sudo cp win10.iso /dev/sdx will make it but not…? Do I have to go through terminal hell for this? :smiley:

There is no terminal hell :slight_smile: just unfamilarity :slight_smile:

WoeUSB is both command line and GUI - so use Pamac to build from AUR - then use the system menu to launch - point and click and you are done

WoeUSB default to FAT32 - select NTFS as filesystem before writing.

1 Like

Hi,

Thank you for this really helpful answer. I have saved this as a bookmark for use when I get there.

1 Like

I haven’t tried your method yet, Before I do, I would Like to share something

I have tried 2 a temps, 1 with etcher and the second with DD both went well

But PC won’t boot from USB, does this sound like Bios settings ?

Either way I will try the TuT U got

many thanks

Most systems has a key for over riding the default boot sequence.

E.g. Lenovo systems uses F12 and Clevo systems usually use F7…You chould check your system manual or the vendor website.

I entered Bios and changed it from there
But did not use Key
I will try that

thank you

UPDATE it must be corrupted or something wrong
when insert the USB I can see all files and Windows exe

Can I Mount it and run exe from there ?

Or I will just download another copy

I have tried the terminal instructions with the newest Windows 10 version and ntfs filesystem, unfortunately it doesn’t work. When I select the USB stick in the boot menu, the screen turns black for a moment and then straight returns to the boot menu. Same thing happened before when trying it with dd like so:

sudo dd bs=4M if=~/path_to_win.iso of=/dev/sdb conv=fdatasync status=progress

What could be the problem?

pebcak - problem exist between chair and computer - as other topics explain - you cannot use dd to create a bootable windows USB. I don’t know why - but it very rarely work with newer Windows ISO.

Why did i fail?I downloaded the Windows iso from Microsoft.
Update:I did it again and it succeeded this time,i did with UUbyte ISO Editor.
The Windows iso was downloaded from Microsoft.

What is the advantage of this method compared to

dd if=windows.iso of=/dev/usbstick

which is a one liner and doing the trick for me since years. Just interested if I miss something? Thanks for the tutorial.

Because it doesn’t work - go ahead - test it.

@randomdude, you can trust @linux-aarhus, he is expert in this subject.

Another ‘reference’:
Manjaro – create Windows USB – Linux Aarhus

1 Like

Thank you :slight_smile: - I don’t consider myself an expert on the subject - experienced yes - expert no. An expert on creating bootable media is a person like @longpanda behind the ventoy project mentioned in OT.

@randomdude
I have succeeded years ago using the dd approach - and the approach was a hit and miss. The tip provided in the OT has been provided with the intent of minimizing frustrations when you attempt to create a bootable Windows USB using Linux.

the problem is that newer windows iso’s only support ‘el torito’ mbr, which is only used for burning iso’s to a dvd or cd. For usage of a windows iso’s which is bootable from a usb drive you need an additional mbr. Linux distribution create hybrid mbr’s for years already, windows is neglecting it.

I have been stumbling over this issue by myself recently and creating a windows bootable usb media with woeusb was the solution. There are many different solutions like converting the iso on osx to a dmg and then put it onto usb with dd.

But simply writing the iso with dd to a usb media with a current windows 10 iso does NOT work, it won’t be bootable.

1 Like