Allen Golbig has an article on AFP548 on creating a package that will create or update a Recovery partition on a Lion or Mountain Lion volume.
The solution requires you get a few pieces from Apple:
- The BaseSystem.dmg and BaseSystem.chunklist from an InstallESD.dmg; found inside “Install Mac OS X Lion.app” or “Install OS X Mountain Lion.app”
- Apple’s Lion Recovery Update package.
Additionally, Allen’s solution requires the use of Joe Block’s The Luggage, which in turn requires Xcode (or at least the Xcode command line tools) and PackageMaker.
Since getting all of that running might be a nasty hurdle to jump for some, I’ve put together a package template you can use. It’s available here.
To use it, you’ll still need to obtain the dmtest tool from the Lion Recovery Update package and the BaseSystem.dmg and BaseSystem.chunklist from an InstallESD.dmg.
pkgutil --expand RecoveryHDUpdate.pkg ./RecoveryUpdate
cd ./RecoveryUpdate/RecoveryHDUpdate.pkg/Scripts/Tools/
cp dmtest /path/to/CreateRecoveryPartition.pkg/Contents/Resources/
hdiutil attach /path/to/InstallESD.dmg -noverify
cp /Volumes/Mac\ OS\ X\ Install\ ESD/BaseSystem.* /path/to/CreateRecoveryPartition.pkg/Contents/Resources/
hdiutil eject /Volumes/Mac\ OS\ X\ Install\ESD/
When you are done, CreateRecoveryPartition.pkg/Contents/Resources/
should contain:
BaseSystem.chunklist
BaseSystem.dmg
dmtest
en.lproj/
package_version
postflight
You’re done unless you’d like to edit the package identifier and/or version in CreateRecoveryPartition.pkg/Contents/Info.plist.
You can now use this package to install a Recovery partition (or update an existing partition).
I was going to have to tackle this myself next week; now I don’t have to! Thank you very much! 🙂
FYI, BaseSystem.chunklist and BaseSystem.dmg will be hidden unless you have show hidden files turned on in Finder.
Thanks! It appears to have worked!
[…] HD to restore, it can be time consuming to build and capture these images. Some admins have taken a packaging approach to creating Recovery HD partitions, which is great for a wide number of deployment tools […]
Very easy to build the package which made it easy to integrate into a Casper workflow. As always Greg, you do an excellent job making the Mac sysadmin’s life easier!
Thank you for this!
Have I mentioned lately that I love you? Thank you so much for making the tools you use available to all of us without your skills. My 700 macs would be completely lost without you.
Guys, I have all the stuff together (Lion Recovery Update package, the BaseSystem.dmg and BaseSystem.chunklist), but no idea what to do now … could anybody explain that to me?
Re-read the post and follow the instructions. If there is a specific part that that is unclear or confusion, ask a specific question. To start, it’s not clear if you also grabbed the package template here: https://dl.dropbox.com/u/8119814/CreateRecoveryPartition.pkg.zip
hello, I am very green with this so please bear with me.
I have downloaded the package file and my Contents directory looks like your post ( it contains the dmtest and the two Base files
so how do i run it? also do i need to have an empty partition on the disk for it to fit into? or will it hack out part of the first partition?
Install the package you just created.
If these tools and instructions are too difficult to follow, you might be interested in this: https://github.com/MagerValp/Create-Recovery-Partition-Installer
ok, i think i figured out you use installer -pkg ./CreateRecoveryPartition.pkg -target / right ???? if so i have a new question. how can i target the correct disk ? diskutil list shows i have /dev/disk0 – /dev/disk4 and the package got installed on disk4 but i need it on disk0 I realized disk4 was the dmg containing the dmtest and disk1 was the install esd disk so i unmounted both of those and reran the install which said it completed successfully, however i don’t see a recovery partition on any of the remaining disks.
ps. this is my package install on a mac so any help you could give would be really awesome.
Surely you’ve installed software before.
Double-click the package and let Installer install it.
I’m not 100% sure it works on anything other than the current boot volume. If you can’t select another volume, you might need to boot from the desired volume, then install the package.
that is my first package install crap now i can’t type!
i have installed software, just not used a mac. first time i have used the command line for that.
thanks! invaluable and helpful article … (: