Created
June 9, 2017 18:14
-
-
Save wido/d8aa15211fcb8119cd8758a29f88bec5 to your computer and use it in GitHub Desktop.
Create Windows 10 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
#!/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