Make Windows 10 bootable USB from Ubuntu 18.04 [duplicate]

It seems that neither winsub or woeusb are installable, except from source but I don't want to go down that rabbit hole, on Ubuntu 18.04. So what is the normal way of making the simplest thing - a bootable Windows USB?


Solution 1:

UPDATE: a more modern and user friendly way to create a bootable drive in ubuntu is using the multibootusb application.

download the deb package and install.

from my testing of it, it can create:

  • linux [persistent] bootable drives for uefi and bios
  • windows bootable drives for uefi and bios
  • multiboot [persistent] linux bootable drive. ie multiple linux bootable ISOs on one drive
  • windows and linux multiboot drive. ie windows and linux reside on the same partition of the same drive

to create a windows bootable:

  1. Insert an empty drive. usually formatted as fat32
  2. Launch the application
  3. select the drive partition (eg /dev/sdXY) from the select usb drop down
  4. select the windows ISO file
  5. Click Install

OLD ANSWER: First find your usb device name:

lsblk

you get something like

NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0           11:0    1 1024M  0 rom  
sda           179:0   0 4.2G  0 disk 
├─sda1  1      79:1   0 3.8G   0 part /home/user/blabla

based on the sizes your USB disk we are assuming your USB is sdX in this case sda so /dev/sda
replace this with yours

unmounted the usb device.

then put an mbr table on it (all info on it would be lost):

sudo parted /dev/sdX mklabel  msdos

then create a brand new partition on the device:

sudo cfdisk /dev/sdX

choose New enter the appropriate value and hit enter then select primary followed by Write and type yes to create the partition

lets check the partitions again to be sure:

lsblk

format the partition to the appropriate format:

sudo mkfs.fat -F32  /dev/sdXY

where y is a number

mount the partition:

sudo mount /dev/sdXY /mnt

now let us extract the windows iso unto the usb:

sudo apt install p7zip-full
sudo 7z x /path/to/windowsfile.iso -o/mnt

after extraction unmount the partion:

sudo umount  /mnt

you have created the bootable disk, just reboot and use