Skip to content

Instantly share code, notes, and snippets.

@wido
Created June 9, 2017 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wido/d8aa15211fcb8119cd8758a29f88bec5 to your computer and use it in GitHub Desktop.
Save wido/d8aa15211fcb8119cd8758a29f88bec5 to your computer and use it in GitHub Desktop.
Create Windows 10 USB Stick
#!/bin/bash
#
# Create Windows 10 USB under Ubuntu 16.04
# You might need to adjust some paths
#
DEV=sda
fdisk /dev/$DEV
# create single partition type 7+bootable partition
mkfs.ntfs -f /dev/${DEV}1
# https://ubuntu-mate.community/t/how-to-ms-sys-fix-mbr-make-windows-installer-in-linux/6850
ms-sys -7 /dev/$DEV
mount -o loop /tmp/win7.iso /mnt/iso
mount /dev/${DEV}1 /mnt/usb
rsync -avr --stats --progress /mnt/iso/* /mnt/usb/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment