How to Create Bootable Windows 10 image in Debian?
I tried the Win7 solution described by Microsoft on a Windows machine:
https://www.microsoft.com/en-us/download/windows-usb-dvd-download-tool
and obtained the
0x80080005 error
so went to Debian Stretch 9 to try to build the Windows 10 bootable USB using a e5.onthehub.com college/school ISO.
Using dd
absolutely doesn't work for Windows 10. This only works for Linux OSes. Use:
dd if=my-linux-os.iso of=/dev/sdX bs=4M
Note: Never try write to /dev/sdX1
where X={a,b,c or d}
and always check you are not overwriting your hard disk which is usually /dev/sda
or /dev/sdb
!
For Windows 10 you can use WoeUSB but not from the apt/yum repos. These ones are obsolete, at least for Debian 9. So instead use:
git clone https://github.com/slacka/WoeUSB.git
Then follow the instructions at the end of:
https://github.com/slacka/WoeUSB
You must have all the prerequisites such as gparted and so forth installed first.
I also found at the end of the process that I must run woeusb with sudo. So you just use:
sudo woeusb --device local/of/my/windows-10-image.iso /dev/sdX
and hey presto it just works brilliantly. In my case my harddisk was /dev/sda
and my USB drive was /dev/sdb
so I wrote the ISO to /dev/sdb
(again be careful, you don't want to overwrite your OS by accident). I then installed it on a military class MSI motherboard with 2TB hard disk attached with no fast boot options inside the BIOS and it just works. I turned on absolutely every UEFI option first to get it into the right state.
I also had problems at install time, with the system hanging forever when using a Gmail email account for login and when the internet cable was connected at the second restart of the machine (during the install process). If you have this issue, disconnect internet, restart machine, let generic account be built, login, restart with internet cable
This worked for me even with legacy/CSM boot (Ubuntu 16.04, Windows 10 Version 1511 32bit; you can use genisoimage instead of mkisofs as well, mkisofs is just a symlink):
mkisofs \
-no-emul-boot \
-b boot/etfsboot.com \
-boot-load-seg 0x07C0 \
-boot-load-size 8 \
-iso-level 2 \
-udf \
-joliet \
-D \
-N \
-relaxed-filenames \
-o win10-1511-32bit-mod1.iso \
files/
(one long line, in bash with backslashes at the end for line continuation)
where files/
is the subdirectory which contains the extracted contents of the Windows 10 ISO.
The key point seems to be the etfsboot.com
from the boot/
subdirectory of the Windows 10 ISO.
I can boot the burned disc with legacy/CSM without any problems.
I did only try out with the 1511 version of win10. If you try with other versions, please leave a comment.
FAT32 is just working for a hard to find 2018 MS-image, and exfat is hassle. After trying a lot of complex how to's that did not work, this 2 step solution succeeded:
- Make an ntfs-partion on the USB device.
Execute
woeusb --partition Win10_1909_Norwegian_x64.iso /dev/sdX1
To get woeusb
working, I installed woeusb and grub2. Grub2 is a workaround for this:
grub2-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify `--target` or `--directory`.
I think Woeusb should be rewritten to find correct directory. My system had the file /usr/lib/grub/x86_64-efi/modinfo.sh
from the grub2-efi
package.