Created
October 28, 2018 10:26
-
-
Save sasin91/d19c931d846bc1d978a267b152241784 to your computer and use it in GitHub Desktop.
./make_windows_usb.sh /dev/sdx /storage/Win10_x64.iso
This file contains hidden or 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
#! /bin/bash | |
# A very simple, primitive and slightly assuming script for creating a bootable windows 10 USB key. | |
# First we'll prepare the USB | |
parted mklabel gpt $1 | |
mkfs.fat32 $11 | |
# Then create the directories... | |
mkdir -p /mnt/Windows10_source | |
mkdir -p /mnt/Windows10_target | |
# Mount the source and target... | |
mount $2 /mnt/Windows10_source | |
mount $11 /mnt/Windows10_target | |
# Rsync the source files over... | |
rsync --verbose --recursive --numeric-ids --progress /mnt/Windows10_source /mnt/Windows10_target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment