Skip to content

Instantly share code, notes, and snippets.

@motionbug
Forked from rockpapergoat/postflight
Created June 15, 2012 18:53
Show Gist options
  • Save motionbug/2938157 to your computer and use it in GitHub Desktop.
Save motionbug/2938157 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