43

I did the dd method and it wrote the iso to the USB drive, but I'm not sure that's all I have to do because it is Windows and may not have GRUB and I'm not sure so I'm asking the experts.

winusb does not work for Windows 10 so this is different from earlier questions.

15
  • Which dd method did you use? Also where did you get the ISO?
    – Wilf
    Mar 22, 2015 at 3:48
  • @wilf i got it from the official windows 10 site (windows.microsoft.com/en-us/windows/preview-iso) Mar 22, 2015 at 3:54
  • @Wilf i used sudo dd if=/home/sakurakami/Downloads/Windows.iso of=/dev/sdf bs=4M Mar 22, 2015 at 3:56
  • @Wilf the operation was successful and i even verified the SHA-1 hash with openssl sha1 Windows.iso Mar 22, 2015 at 4:01
  • @karel no WinUSB didn't work. Mar 22, 2015 at 14:34

8 Answers 8

40

I tried all the ways in this thread and none worked (and seriously, the question is about specifically writing to an USB key, why would people propose copying the ISO to another partition instead ??).

The solution that did the trick for me (assuming your USB drive is /dev/sdc):

  • Run gparted
  • Create a new partition table on sdc, type msdos
  • Create a NTFS partition, set the boot flag on it
  • Extract the iso (can be done with 7z x windows10.iso)
  • Copy the content (via cp, rsync, a GUI, whatever) to the mounted NTFS partition (certainly /dev/sdc1)

  • The last, critical step, taken from this post : https://superuser.com/a/817656/248812 is :

    sudo ms-sys -7 /dev/sdc.

    ms-sys is available in a ppa : https://launchpad.net/~lenski/+archive/ubuntu/ms-sys

Without ms-sys, blinking cursor on boot when the USB key is inserted.

With it, windows logo shows up.

13
15

You don't need a USB, DVD or other external medium to install a Windows 10 Install Disk (ISO) starting from a Ubuntu only installation. It is possible to extract the image or ISO file to a partition of one your hard disks, preferable not the one your will use for a new Windows installation, and use it.

For the following steps, a working GRUB configuration should be present:

  1. Make sure you have a bootable and formatted NTFS partition present. Below, the partition will identified by (hd0,5) where hd0 is the containing hard disk with MSDOS or MBR partition table layout.

  2. Mounting the image will make it easier to extract it's contents. If Disk Image Mounter refuses to mount the iso file you can always use this command to mount any iso file:

    sudo mount -o loop [Image_Path] [Mount_Point]
    
  3. Copy the contents of new loop device to the NTFS partition.

  4. Now add a GRUB entry for Windows 10. This will make it possible for the bootloader GRUB to find install disk contained in the partition. Open /boot/grub/grub.cfg in text editor as root and add these lines

    menuentry 'Windows 10 Install Disk' {
    set root=(hd0,5)
    insmod part_msdos
    insmod ntfs
    insmod ntldr
    drivemap -s (hd0) ${root}
    ntldr /bootmgr
    }
    

    change the root if needed, accordingly.

  5. Save and restart computer. Boot into the right item of your updated GRUB menu.

Watch this Youtube tutorial https://youtu.be/1Y4JXv9r5Ug

8
  • It will not work if you're installing to the same partition or drive that you're booting from. Jul 3, 2016 at 19:40
  • 5
    @ThisNameBetterBeAvailable How is this the correct answer? It doesn't even put the data on USB.
    – jbo5112
    Sep 14, 2016 at 23:08
  • 7
    @ThisNameBetterBeAvailable How is extracting to a USB unnecessary to "burn the Windows 10 ISO to a USB," as the original asker was requesting. They might be wanting to use this on multiple computers.
    – jbo5112
    Sep 16, 2016 at 5:02
  • 1
    @jbo5112 That wasn't mentioned in the question, so assuming his goals and trying to help him with that is what happened.
    – x13
    Sep 16, 2016 at 6:33
  • 5
    @ThisNameBetterBeAvailable It's in the title of the question.
    – jbo5112
    Sep 17, 2016 at 11:13
7

You can copy all the ISO contents to the flash drive and make it bootable.

So, first of all, install GParted from software center or from terminal:

sudo apt-get install gparted

Then, open it from dash or terminal:

gksudo gparted

After that, choose the flash drive from the menu in top right corner. There should be one partition. If you haven't any data to backup, reformat it as ntfs (bootmgr doesn't work right on fat32), click Apply (the tick in the header menu). Right-click the partition, choose Manage flags and check boot.

Then, you can mount it through your file manager (nautilus is default for GNOME and Unity).

Mount the ISO file:

sudo mount -o loop [path to iso] [mountpoint]

Then, you can copy all contents from the ISO mountpoint to the flash drive via the file manager.

Reboot your computer and set the USB Flash Drive to boot first.

8
  • Yeah I tried booting it but it appears to have not worked. Can you give me the list of commands you used? Mar 22, 2015 at 14:32
  • I have just copied from the file manager and enabled the boot flag from GParted.
    – aastefanov
    Mar 22, 2015 at 14:59
  • @SakuraKaminari - could you add more details as to how it has appeared not to work?
    – Wilf
    Mar 22, 2015 at 15:09
  • @wilf it didn't boot. Mar 22, 2015 at 15:15
  • @alb3rtano0012 how can i mount it? It doesn't want to mount. it's currently on /dev/sdf Mar 22, 2015 at 15:15
4

I managed to do this with WoeUSB. To install the WoeUSB command line tool snap package in all currently supported versions of Ubuntu open the terminal and type:

sudo snap install --edge woe-usb  
sudo snap connect woe-usb:removable-media

To launch the woe-usb snap package command line tool run the following command:

/snap/bin/woe-usb.woeusb

If you get a permission denied error click the Permissions button on the woe-usb screen in Ubuntu Software and toggle the permissions options from OFF to ON as shown in the below screenshot.

woe-usb Permissions

2
  • worked perfectly, thank you! :)
    – Geeocode
    Mar 13, 2019 at 2:38
  • This was the easiest solution for me. For Windows 10, you'll have to select NTFS as the file system.
    – rgov
    Sep 18, 2019 at 1:40
2

The ms-dos package is quite old an unmaintained. It does not load on ubuntu 16-04. Instead use the syslinux package which most likely already is installed: http://ubuntuhandbook.org/index.php/2013/08/repair-windows-mbr-from-ubuntu/

Also cp to an ntfs partition is slow. Extract the iso directly to sdc1

  • Run gparted
  • Create a new partition table on sdc, type msdos
  • Create a NTFS partition, set the boot flag on it
  • Copy the iso

    sudo dd of=/dev/sdc1 if=Win10_1703_English_x64.iso bs=4M

  • Create MBR

    sudo dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sdc

3
  • worked perfectly, should be the accepted answer. Thanks.
    – anon
    Jan 30, 2018 at 16:06
  • I just tried this (using Win10_1709_Dutch_x64.iso downloaded from MS) and it did not work for me. Booting the resulting USB stick failed with Missing operating system (which I think is printed by the MBR), booting on an actual system shows a similar message from the BIOS (which probably hides the MBR message). I wonder how this is supposed to work? A .iso does not contain NTFS? Mar 29, 2018 at 14:29
  • Should be an accepted answer - it is the easiest and does not require any external dependencies. dd'ing the .iso did not work for me though - it still created ufs filesystem instead of existing NTFS, but simple cp followed by dd'ing MBR worked like a charm
    – avtomaton
    Nov 15, 2022 at 21:17
1

If you weren't sure, then how can you say that the dd method worked? Also, that ain't the way. You have to use Rufus to make the USB drive bootable;not that I discourage the dd practices, since it is Windows we are talking about, I believe it is best to use Rufus to handle this for you.

If you have a Windows installation already, then boot into it and follow the steps below or else, use virtualbox.

PROCEDURE:

According to: http://www.cnet.com/how-to/how-to-install-windows-10-technical-preview-from-a-flash-drive/

you'll need at least 4GB flash drive (8GB for 64-bit).

--> Download and run Rufus, then insert your flash drive, making sure it doesn't contain any important data. (It's about to get wiped.) Rufus should automatically detect the drive and list it in the Device field. (If not, select the drive manually.)

--> Notice the check box marked, "Create a bootable disk using." Click the drive icon at the far right, then navigate to wherever you saved the Windows 10 ISO file. Select it, and then click Start. (All the other default settings in Rufus should be fine.)

--> This will take some time, perhaps as long as 20-30 minutes. Don't be alarmed (or confused) if an Explorer window appears for the flash drive; just leave it alone until Rufus reports "DONE." Then you can close the program and drive window and remove the drive.

--> Now it's time for the old PC. Plug the flash drive into a USB port, then power up the system. Most likely, it won't be configured to boot from an external drive by default, so you may need to jump into a startup menu or the BIOS during the POST. Ultimately, you need to force the machine to boot from the flash drive. Once you've done that, reboot, then follow the Windows installation instructions.

All the best!

13
  • but I don't have windows. the reason i want windows 10 is because my windows 7 doesn't work so I can't burn with rufus. is what i did ok? Mar 22, 2015 at 4:05
  • Then, install Windows in VirtualBox. Or, download WinUSB as suggested in: askubuntu.com/questions/289559/… The link shows how to regarding Windows 8 but I bet it would work with Windows 10. Mar 22, 2015 at 4:10
  • well it seems that winusb didnt work reliably and idk ill try it but Mar 22, 2015 at 4:15
  • Well, then it is best to use VirtualBox now. If you are trying to use Windows, then it is best to host Windows (virtually for the time being). Mar 22, 2015 at 4:17
  • I got this from WinUSB: Installation failed ! Exit code: 256 Log: Formating device... Error: /dev/sdf: unrecognised disk label Mar 22, 2015 at 4:21
1

Found a much easier solution. Mount the ISO with loop etc and -t udf. Copy everything in a spare NTFS partition. Mark this partition as boot in gparted. Run sudo update-grub and reboot.

4
  • Note that you will be able to boot this usb drive only from the computer you were running the "update-grub"
    – ozma
    Mar 26, 2016 at 12:39
  • 2
    @ozma This answer doesn't concern a USB drive. Aug 17, 2016 at 15:19
  • @forresthopkinsa You are right, my comment was meant to prevent such an error
    – ozma
    Aug 18, 2016 at 6:23
  • This method worked until the Windows 10 Installer complained about booting from a ntfs partition and aborted. Aug 29, 2016 at 4:51
1

I tried with the ms-sys, it ran but I could not get the USB to boot. However, this worked:

sudo apt install woes
sudo woeusb --target-filesystem NTFS --device Win10.iso /dev/sdX

where the /dev/sdX must be your USB key.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .