Skip to content

Instantly share code, notes, and snippets.

@sasin91
Created October 28, 2018 10:26
Show Gist options
  • Save sasin91/d19c931d846bc1d978a267b152241784 to your computer and use it in GitHub Desktop.
Save sasin91/d19c931d846bc1d978a267b152241784 to your computer and use it in GitHub Desktop.
./make_windows_usb.sh /dev/sdx /storage/Win10_x64.iso
#! /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