Make Windows 10 bootable USB from Ubuntu 18.04

9,163

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

Share:
9,163

Related videos on Youtube

Alex Botev
Author by

Alex Botev

Updated on September 18, 2022

Comments

  • Alex Botev
    Alex Botev over 1 year

    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?

    • Alex Botev
      Alex Botev about 6 years
      Some of the answers there don't apply to 18.04 unfortunately which is why I asked it again.
    • David Foerster
      David Foerster about 6 years
      @AlexBotev: In that case please refer to the answers that apply to 18.04 instead. Unless all answers are outdated I don't see a need for a new question.
    • Alex Botev
      Alex Botev almost 6 years
      Well, the winusb and other similar programs do not run on 18.04. I tried the answer given below but that does not seem to make a bootable USB stick either. So at this stage, I'm yet to see an answer that actually works in 18.04?
    • sudodus
      sudodus almost 6 years
      mkusb works in 18.04 LTS. See this link, mkusb-nox and mkusb version 12 can create Windows install drives
    • Alex Botev
      Alex Botev almost 6 years
      @sudodus I got this error at the end: Bootloader: Installing for i386-pc platform. grub-install: error: cannot find a GRUB drive for /dev/sda1. Check your device.map. mkcmd_runcmd: mk_msdos:error grub-install:error. Failed. p_clean: clean if necessary and return clean if necessary and quit
    • sudodus
      sudodus almost 6 years
      I understand that you are running Ubuntu 18.04 LTS; 1. Are you running Ubuntu in UEFI mode or BIOS mode? 2. Which version of mkusb are you running? The problem with the grub bootloader should be independent of the version of Windows, so I will try with the current version of mkusb and check, if I can reproduce the error. But I need an answer to the two questions in order to test the relevant things.
    • sudodus
      sudodus almost 6 years
      I tested in Ubuntu 18.04 LTS, and can verify that mkusb works for me, I get a Windows install drive, that works both in UEFI mode and BIOS mode. 'Bootloader: Installing for i386-pc platform. Installation finished. No errors reported. Done :-)'. I don't understand 'grub-install: error: cannot find a GRUB drive for /dev/sda1.' What do you want to do with /dev/sda1? It is usually on an internal drive, not where you want to create your Windows installer. Or is the problem that there is no grub software in the computer? In that case you need to install it, when mkusb asks for it.
    • sudodus
      sudodus almost 6 years
      The program grub-install is packaged in grub2-common and you need grub-pc to install the BIOS bootloader. So install that package (check that it is installed), I think both packages, if you run in BIOS mode or in a live or persistent live system in UEFI mode. In an installed system in UEFI mode, mkusb clones the bootloader from an image file (because there is a conflict between the bootloader packages for UEFI mode and for BIOS mode). The cloning method is less flexible, but the best solution so far for that problem. Anyway mkusb works for me in all modes in 18.04 LTS.
    • karel
      karel almost 6 years
      The PPA that provides WoeUSB fork of WinUSB has been updated, and now it provides packages for 18.04.
  • Alex Botev
    Alex Botev about 6 years
    I'll try it tomorrow and if it works would happily mark it as an answer.
  • Nocturno
    Nocturno almost 6 years
    This worked for me on 18.04. I tried several suggestions before this, and none of them worked.
  • Odyssee
    Odyssee over 5 years
    Can confirm, this method works.
  • Elias Soares
    Elias Soares over 5 years
    It won't work with some windows ISO files because they contain large files (greater then 4GB). Probably using NTFS as fs would work.