[HOWTO] Create a bootable Windows 10 EFI USB device on Linux
WARNING: Your USB device will be totally erased from all content ! Do a backup if needed !
Very small howto, just because I found many people who doesn’t know how to create a Windows 10 bootable USB device with EFI support.
To make it short, to boot with EFI on modern computers (less than 5-6 years – both laptop and desktop – ) all you need is
love a device with a GPT partition table and a FAT32 partition (called an ESP partition) containing Windows 10 files.
On linux, it’s fairly easy to create it. You will need gdisk / gptfdisk AND NOT FDISK (this is important as fdisk doesn’t know how to create GPT partition tables). Use the device path for gdisk (ex : /dev/sda but not partition, i.e no /dev/sda1)
user@machine$: sudo gdisk /dev/<device>
Enter ‘o’ to create a new GPT table on device Enter ‘n’ to create a new partition (whole disk, just press enter when asked for starting / ending blocks) but warning: modify partition type as follows (can be done with command ‘t’ if needed) Enter code ‘0700’ for Microsoft Basic Data (don’t know if that’s really usefull)
Create the FAT 32 filesystem on the device and mount it where you want to (note: this time, use the partition not the device):
user@machine$: sudo mkfs.vfat -F 32 /dev/<device>1 user@machine$: sudo mount /dev/<device>1 /<dev_mountpoint>
Now, mount your Windows 10 iso as loopback device (automatically done by mount, no need to play with losetup) wherever you want:
user@machine$: mount /path/to/iso/Win10_1511_1_<Version>_<Language>_x64.iso /<iso_mountpoint>
And the last step, copy all the content of the mounted iso to your device. And yes, it’s that easy.
user@machine$: sudo cp -R /<iso_mountpoint>/* /<dev_mountpoint>/
Eject your USB device and voilà ! You’re ready to go !