Skip to content

Instantly share code, notes, and snippets.

@rockpapergoat
Created May 22, 2012 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rockpapergoat/2769796 to your computer and use it in GitHub Desktop.
Save rockpapergoat/2769796 to your computer and use it in GitHub Desktop.
create a recovery partition using apple's tools
#!/bin/bash
hdiutil attach -nobrowse -noverify /tmp/RecoveryHDUpdate.dmg
hdiutil attach -nobrowse -noverify /Volumes/RecoveryHDUpdate/RecoveryHDUpdate.pkg/RecoveryHDMeta.dmg
/tmp/RecoveryHDUpdate/RecoveryHDUpdate.pkg/Scripts/Tools/dmtest ensureRecoveryPartition / /Volumes/Recovery\ HD\ Update/BaseSystem.dmg 0 0 /Volumes/Recovery\ HD\ Update/BaseSystem.chunklist
hdiutil eject /Volumes/Recovery\ HD\ Update
hdiutil eject /Volumes/RecoveryHDUpdate
touch /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
kextcache -f -u /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment