Last active
July 20, 2017 13:55
-
-
Save githubnando/01018b629836506aeeee28bde9bb860a to your computer and use it in GitHub Desktop.
Make a bootable Windows 10 UEFI USB Stick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Let the device unmounted | |
sudo umount /dev/sdb | |
# Optional: change the content to zeros | |
sudo dd if=/dev/zero of=THE_DEVICE bs=512 count=1 | |
# Normally this is not nessecary. Then to create a new layout on the drive: | |
sudo fdisk /dev/THE_DEVICE | |
# Then: | |
# Press G to create a new GPT, | |
# Press N to create a new partition, | |
# Press T to choose the partition type, | |
# Enter 11 for the Microsoft basic data. | |
# Press W to write the changes to disk. | |
# Make fat32 format | |
sudo mkdosfs -F32 THE_DEVICE | |
# Mount the newly created partition | |
sudo mount /dev/THE_DEVICE_PARTITION_1 /media | |
# Mount the ISO | |
sudo mount windows10.iso /mnt | |
# Copy the contents | |
cp -R /mnt/* /media |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pior que sempre que preciso gravar uma iso pra algum conhecido acabo fazendo na mão (e pesquisando os passos cada vez que vou fazer novamente).. Esse script tá marcado pra baixar no meu bashrc asap 🚀