Skip to content

Instantly share code, notes, and snippets.

@arturparkhisenko
Last active February 22, 2019 04:12
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 arturparkhisenko/1be9de199330bbddc92401a8dfc5e93d to your computer and use it in GitHub Desktop.
Save arturparkhisenko/1be9de199330bbddc92401a8dfc5e93d to your computer and use it in GitHub Desktop.
windows-to-usb-on-macos.sh
# download image here https://www.microsoft.com/en-us/software-download/windows10ISO
# mount it
diskutil list
# check identifier, it's could be like disk2
# format disk using identifier in the end
diskutil eraseDisk ExFat "WINDOWS10" MBR disk2
# copy all files from the image mounted
cp -rp /Volumes/CCCOMA_X64FRE_EN-US_DV9/* /Volumes/WINDOWS10/
# WAY 2, (for image path - just grab iso and drag it into console)
diskutil unmount disk3s1
sudo dd if=/path/image.iso of=/dev/rdisk3s1 bs=1m
diskutil eject /dev/disk3s1
# convert iso to dmg
hdiutil convert -format UDRW -o dest.img orig.iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment