How to Make a Lion (Mac OS X 10.7) Recovery HD System Disk Image for BIC/ASR
These instructions are largely based on the asr 'man' pages.
- Enable Disk Utility's Debug menu in the terminal, which is required to reveal and mount the hidden Recovery HD disk volume when using Disk Utility:
Use Disk Utility to verify that the filesystem of the hidden Lion Recovery HD volume is healthy, create the image, and then prepare the image for restoring. To Launch Disk Utility: In the Finder, select "Utilities" from the "Go" menu to quickly open the Utilities folder, and double click the Disk Utility.app icon.
- From the Debug menu select Show every partition:
- Mount the hidden Recovery HD volume by selecting the greyed out Recovery HD disk icon (1), then click the Mount button (2) at the top of the window:
- Verify that the filesystem of the Recovery HD volume is healthy by selecting the Recovery HD disk icon (1), then click the Verify Disk button (2) in the lower right corner of the window. Do NOT proceed to the next step unless Disk Utility reports The Volume Recovery HD appears to be OK.
Create a disk image of the Recovery HD volume.
- Select File, New, Disk Image From Folder... :
In the Select Folder To Image dialog select the master Mac disk on the left side, in this case, Recovery HD, then click the Image button:
In the New Image from Folder dialog enter in the file name you want for the disk image, select Compressed (Change it to read-only for asr multicast use!) as the Image Format, and set Encryption to none, then click the Save button :
Next you'll be prompted to enter in your admin username and password, then Disk Utility will continue through the process of creating a new disk image and copying the data to it from the Recovery HD disk that was selected in this example:
Prepare the Recovery HD disk image for restoring.
To add checksums and optimize the layout of the data in the disk image for data restore verification and quicker restores, select the disk image in the left side panel ("Lion-Recovery-HD.dmg"), then select Scan Image for Restore from the Images menu:
The process will go through several stages (block checksum, reordering before the image is completely scanned):
- To add checksums and optimize the layout of the data in the disk image for data restore verification and quicker restores, select the disk image in the left side panel ("Lion-Recovery-HD.dmg"), then select Scan Image for Restore from the Images menu:
In order to restore the Lion Recovery HD disk image you'll need to be running BIC version 2.9.3b1 or later and run the PartitionAndRestoreLionRecoveryHD.pl Post-Restore-Script included in the download of BIC:
my $recoveryHDdiskImageFileName = "Lion-Recovery-HD.dmg";
my $recoveryHDdiskImagePath = dirname($0) . "/../RestoreImages/$recoveryHDdiskImageFileName";
Move/Copy the Lion-Recovery-HD.dmg file to the RestoreImages folder so that BIC (via a post-restore-script) can access it:
After the main system image is restored select and run the PartitionAndRestoreLionRecoveryHD.pl script in the Post-Restore-Script dialog, and click the Run Script button (or specify the script name in the POST_RESTORE_SCRIPT key in your selected configuration/workflow pref file.)
- If a hidden Recover HD volume does not already exist, a new one will be created:
- Next the Lion-Recovery-HD.dmg disk image will be restored to the new partition via asr:
- Lastly, the partition type will be changed to Apple_Boot via asr's adjust command:
- IMPORTANT: Make sure that your Recovery HD disk image is named "Lion-Recovery-HD.dmg" which the PartitionAndRestoreLionRecoveryHD.pl script will look for in the RestoreImages folder.
- Advanced: You could instead place the Lion-Recovery-HD.dmg file on another server (AFP, SMB, http) as well by changing the PartitionAndRestoreLionRecoveryHD.pl script variables:
The PartitionAndRestoreLionRecoveryHD.pl is included with the BIC download disk image as of version 2.9.3b1, and is also available as a direct download from GitHub. It does not require BIC to run, but you must run it with sudo or as the root user.
If you would like to help contribute to the script's development we are hosting it on GitHub.
- Move/Copy the Lion-Recovery-HD.dmg file to the RestoreImages folder so that BIC (via a post-restore-script) can access it:
Last Updated July 10, 2013