Last active
December 16, 2018 01:00
-
-
Save arleighdickerson/b70c98f901d208037414aef45d44b833 to your computer and use it in GitHub Desktop.
Create bootable windows 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 | |
# ======================================== | |
# For /dev/sdXn, | |
# X is one of a,b,c,... | |
# n is one of 1,2,3,... | |
# ======================================== | |
# see https://wiki.archlinux.org/index.php/USB_flash_installation_media#Using_manual_formatting | |
# 1) In "Disks" application | |
# ======================================== | |
# ENSURE /dev/sdX IS NOT MOUNTED!!! | |
# 2) In Terminal | |
# ======================================== | |
sudo wipefs --all /dev/sdX | |
# 3) In "Disks" application | |
# ======================================== | |
# - erase device | |
# - format device MBR | |
# - create NTFS partition | |
# - "edit partition" -- make bootable | |
# 4) In Terminal | |
# ======================================== | |
sudo mkdir -p /mnt/{iso,usb} | |
sudo mount -o loop Win8.1_English_x64.iso /mnt/iso | |
sudo mount /dev/sdXn /mnt/usb | |
sudo cp -a /mnt/iso/* /mnt/usb && sync | |
sudo umount /mnt/iso | |
# 5) Profit | |
# ======================================== | |
# $$$ acquire currency $$$ | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment