DEV Community

Arseny Zinchenko
Arseny Zinchenko

Posted on • Originally published at rtfm.co.ua on

Linux: woeusb – creating Windows USB boot flash drive

Well – sometimes have to do a bit weird things…

Today need to create bootable USB flash drive with Windows 10 from Linux.

There are various solutions but today I found the woeusb utility and it works pretty well plus it can format a drive to a necessary filesystem.

Install on Arch Linux from AUR:

$ yaourt -S woeusb

Find your flash drive:

$ lsblk
NAME             MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                8:0    0   477G  0 disk
├─sda1             8:1    0     1G  0 part /boot
├─sda2             8:2    0    16G  0 part [SWAP]
└─sda3             8:3    0   460G  0 part
├─vg_arch-root 254:0    0    50G  0 lvm  /
└─vg_arch-home 254:1    0   410G  0 lvm  /home
sdb                8:16   0 931.5G  0 disk
└─sdb1             8:17   0 931.5G  0 part /backups
sdc                8:32   1  14.3G  0 disk
└─sdc1             8:33   1  14.3G  0 part

Here it is /dev/sdc in this case.

Run WoeUSB:

$ sudo woeusb --device Downloads/Win10_1809Oct_English_x64.iso /dev/sdc
WoeUSB v@@WOEUSB_VERSION@@
==============================
Mounting source filesystem...

Error: File "/media/woeusb_source_1550995484_30256/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.

Refer: https://github.com/slacka/WoeUSB/wiki/Limitations#fat32-filesystem-4gib-single-file-size-limitation for more info.

Unmounting and removing "/media/woeusb_source_1550995484_30256"...

You may now safely detach the target device

Okay…

Check the filesystem type on the device:

$ sudo fdisk -l /dev/sdc
Disk /dev/sdc: 14.3 GiB, 15376000000 bytes, 30031250 sectors
...
Device     Boot Start      End  Sectors  Size Id Type

/dev/sdc1  *     2048 30029823 30027776 14.3G  c W95 FAT32 (LBA)

There is ready solution in the documentation here>>>.

Run woeusb again with the --target-filesystem option and set the NTFS:

$ sudo woeusb --target-filesystem NTFS --device Downloads/Win10_1809Oct_English_x64.iso /dev/sdc

WoeUSB v@@WOEUSB_VERSION@@
==============================
Mounting source filesystem...
Wiping all existing partition table and filesystem signatures in /dev/sdc...
...
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.
...
Mounting target filesystem...
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_1550995613_701"...
Unmounting and removing "/media/woeusb_target_1550995613_701"...
You may now safely detach the target device
Done!
The target device should be bootable now

Done.

Similar posts

Top comments (2)

Collapse
 
theelectricdave profile image
David S.

Damn, thats awesome. This could use a frontend though!

Collapse
 
setevoy profile image
Arseny Zinchenko

Do you mean UI? Maybe woeusb even has it...
Yeah, it is - woeusbgui.
I just always prefer to use a terminal.