1

Unfortunately I will need to install this OS on my new PC. Since I only have Linux right now, I'll need to create media to boot from on my PC. I'd prefer it to be USB, since currently I have no access to disc drive. How can I create bootable USB stick with Windows 10, given I have the ISO file?

I'm using Gentoo Linux, if you want to see if the tool is available in repos for me.

  • you can just install it from your linux command prompt. basically, you'll unpack the install.wim file to whatever NTFS disk you've formatted for its use ahead of time. – mikeserv Dec 4 '15 at 17:42
  • i think the win10 install on usb stick is horrible. Always get a media driver is missing error. you might want to burn it to dvd instead. Unless you know how to slipstream all your motherboard, usb, and ahci drivers into the windows iso before putting to usb stick. – ron Jan 22 at 18:23
4

The easiest way would be to direct write the iso to your usb stick. This can be achieved with this command:

 dd bs=4M if=/path/to/win10.iso of=/dev/sdx && sync

Where /path/to/win10.iso is the location of your Windows 10 iso file and /dev/sdx is the location of your usb drive (you can identify that with the lsblk command).

However dd might cause issues with the usb drive, if you want to reuse it for something else.

An alternative way would be by creating a new GPT partition table on the disk in something like gparted and giving it the "boot" flag. You'd then need to mount the iso and copy the contents over to a new NTFS partition like this:

mkdir Win10
mount -o loop /path/to/win10.iso Win10
cd Win10
cp -a * /mount/usb

Where /mount/usb is your mounted partition.

  • ntfs GPT boot partition? you mean an ntfs esp? is that a thing? – mikeserv Dec 4 '15 at 16:38
  • Essentially yes... all I'm talking about is having GPT Partition table and partition formatted as NTFS - that partition needs to have a type of "EF00". If you were doing the work in gparted, that would be the equivalent of setting the "boot" flag. Those are the only requirements for an EFI disk to boot. – dcrdev Dec 4 '15 at 16:43
  • Could you please go into detail about how dd can cause issues with USB stick in the future? – MatthewRock Dec 4 '15 at 17:10
  • @dcrdev - thats not a thing. a UEFI firmware isnt going to boot that - it doesnt speak ntfs. the partition needs to be FAT. – mikeserv Dec 4 '15 at 17:36
2

I was following the dd approach on Archlinux and it didn't set the bootable flag for the partition, as such it didn't boot from BIOS.

My alternative was to install (using pacman on Archlinux) and use woeusb. Based on your distro, you may need to follow different instructions to install WoeUSB (e.g. ubuntu instructions). It offers both CLI and UI for creating the bootable disk from the .iso file (I used the UI flavor).

  1. Launch WoeUSB
  2. Select your windows .iso
  3. Select your USB drive (in my case /dev/sda)
  4. Select NTFS if your image is > 4GB (as FAT can be used only on less than 4GB) enter image description here
  5. Click Install enter image description here
  6. I went and checked with cfdisk the bootable flag:
sudo cfdisk /dev/sda
                                                  Disk: /dev/sda
                                Size: 28.9 GiB, 31004295168 bytes, 60555264 sectors
                                         Label: dos, identifier: 0x5badb9c0

    Device           Boot                Start            End        Sectors       Size      Id Type
>>  Free space                            2048           8191           6144         3M                             
    /dev/sda1        *                    8192       60554239       60546048      28.9G       7 HPFS/NTFS/exFAT
    /dev/sda2                         60554240       60555263           1024       512K       e W95 FAT16 (LBA)

And I saw it was still not checked. So I went and enabled it.

I used the USB stick to boot the windows OS and now it worked as a charm.

UPDATE: I wonder if using dd would have worked, as I didn't check if the partition created was NTFS (as it shouldn't have been FAT). And enabled the bootable flag using cfdisk.

  • Thanks for the answer. I didn't downvote it, but your answer is pretty bad - essentially it is a link only answer, as you did not explain how to use the suggested program. I suggest either providing a real instructions on how to solve the problem, or removing the answer as it does not help. Bear in mind that the problem is already solved, so I won't accept the answer (or verify if it works). – MatthewRock Jan 24 at 12:40
  • Thank you @MatthewRock for your comment. Will update with the details you requested. – azbarcea Jan 24 at 14:26
  • 1
    Thank you @MatthewRock for your comments. I hope the details are sufficient now. – azbarcea Jan 25 at 15:14
  • +1; Today cloning (with dd) does not work with Windows 10 iso files. Maybe it did 2015, when the accepted answer was written. woeusb works. A few months ago it only worked in command line mode, but you show that also the GUI mode works now. I assume you tested with an iso file containing an install.wimfile bigger than what FAT32 can manage, > 4 GiB. – sudodus Jan 25 at 20:20
  • Yes, I was using the Win10_1909_English_x64.iso file from the official microsoft site: microsoft.com/en-us/software-download/windows10 – azbarcea Jan 26 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.