Skip to content

Instantly share code, notes, and snippets.

@JonnyTech
Last active April 25, 2022 00:07
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 JonnyTech/bcdd1567d4fb9a359447bb2f865aa313 to your computer and use it in GitHub Desktop.
Save JonnyTech/bcdd1567d4fb9a359447bb2f865aa313 to your computer and use it in GitHub Desktop.
Create bootable macOS installer drive
#!/bin/bash
# url: https://github.com/notthebee/macos_usb
git clone "https://github.com/corpnewt/gibMacOS"
./gibMacOS/gibMacOS.command -v 11
mv gibMacOS/macOS\ Downloads/publicrelease/*/*.pkg .
7z e -txar InstallAssistant.pkg SharedSupport.dmg
7z e SharedSupport.dmg 4.* 5.*
mv 4.* 4.hfs
usb=/dev/sdb
sgdisk --zap-all ${usb}
sgdisk -n 0:0:+200MiB -t 0:ef00 ${usb}
sgdisk -n 0:0:0 -t 0:af00 ${usb}
dd if=4.hfs of=${usb}1 bs=1M status=progress oflag=sync
dd if=5.hfs of=${usb}2 bs=1M status=progress oflag=sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment