4

I have downloaded the Windows 10 iso file and first, I tried to write it to my 16GB USB with the command sudo dd if=Win10.iso of=/dev/sdb and it didn't work so I tried balena etcher. it says missing partition table. Can you help me with this please? the iso file works perfect on a VM BTWenter image description here

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
  • 1
    You probably destroyed the partition table by doing dd first. Try partitioning your USB drive again and then use Etcher. Just make sure you're picking the right drive. – Sebastian Dec 21 '20 at 10:26
  • Just read the error message more closely, and it seems to complain about the iso and not the drive indeed. Where is that iso from anyway? And what's with the libreoffice tag? – Sebastian Dec 21 '20 at 10:30
  • 1
    use gparted to format flash disk – BarzanHayati Dec 21 '20 at 10:48
  • This answer may help you. https://askubuntu.com/a/12293/124466 – Archisman Panigrahi Dec 21 '20 at 10:57
  • Use mkusb-dus or mkusb-plug to make your installer USB. https://askubuntu.com/questions/1274878/make-windows-10-bootable-usb-in-ubuntu – C.S.Cameron Dec 22 '20 at 00:37
  • @C.S.Cameron Hi. Thank you. I haven't heard of mkusb. Is it really a safe tool? – Python is cool Dec 22 '20 at 11:24
  • @Python is cool: mkusb-plug goes to great lengths to be safe. It double checks everything. Much, much safer than dd, (AKA disk destroyer). – C.S.Cameron Dec 22 '20 at 12:03
  • @C.S.Cameronbt safe I meant malware. I don't want it to ad malware to the USB because it is not on the ubuntu repository – Python is cool Dec 22 '20 at 12:05
  • @Python is cool: Sudodus, the maintainer, has been answering questions on Ask Ubuntu for close to nine years and has a very high reputation here, (34,266). He is Staff Emeritus over at Ubuntu Forums and has also been helping people there for over nine years. He will provide Source Code if you ask. – C.S.Cameron Dec 22 '20 at 12:30
  • @Python My understanding is that mkusb just does what dd does, it just does it safer. – C.S.Cameron Dec 22 '20 at 13:19

2 Answers2

2

This is the solution for Windows 10. Please assume that /dev/sdx is the block device of the USB stick.

Note: there are little differences between < v1809 and >= v1809 that are noticed in screendump.

Open a terminal session, then:

sudo su
DEVICE=/dev/sdx

wipe MBR

dd if=/dev/zero of=$DEVICE bs=1M count=1

new partition table

fdisk ${DEVICE} n p 1 ENTER ENTER t c a w

new filesystem

mkfs.vfat ${DEVICE}1

mount it

mkdir /mnt/usb mount ${DEVICE}1 /mnt/usb

win 10 as loop device

mkdir /mnt/Win10 mount -o loop /path/to/Win10_x64.iso /mnt/Win10

copy files from iso to usb-stick:

if win 10 version < 1809

cp -a /mnt/Win10/* /mnt/usb

if version >= 1809

apt install wimtools rsync -avP --exclude='sources/install.wim' /mnt/Win10/ /mnt/usb/ wimsplit /mnt/Win10/sources/install.wim /mnt/usb/sources/install.swm 2500

clean up

umount /mnt/usb umount /mnt/Win10 rm /mnt/usb rm /mnt/Win10

ingank
  • 121
0

I finally realized it is not a good idea to make a windows 10 installation USB with Linux distros. The best way is to have it done by a windows c or installing Windows on a virtual machine and making the USB there if your main OS is Linux.