OS X Lion’s Recovery HD partition is required for some new Lion features, like FileVault 2 (http:/ /support.apple.com/kb/HT4649). Unfortunately NetRestore does not create this partition. A supported way of setting this partition up is to install a minimal OS X Lion system first.
Since NetInstall uses the installer command to create the partition we can do the same.
Read on for more…
The first step is to mount the InstallESD.dmg from within the "Install Mac OS X" App. To only have a minimal installation you can create an installation choices XML file for that purpose.
With the following command you can create a choices XML-file and place it on your Desktop. Note that “myHD” is the name of the empty partition that you want to install the NetRestore image on.
installer -pkg /Volumes/Mac OS X Install ESD/Packages/OSInstall.mpkg -target /Volumes/myHD -showChoiceChangesXML > ~/choices.xml
To only install the necessary packages you can set all the attributeSetting keys to zero except for the EssentialSystemSoftware and EssentialSystemSoftwareGroup dict entries. You should keep this modified choices file for all future installations.
sudo installer -pkg /Volumes/Mac OS X Install ESD/Packages/OSInstall.mpkg -target /Volumes/myHD -applyChoiceChangesXML ~/choices.xml
After the installer is done you should have a shiny new Recovery HD partition on the disk. Once the Recovery HD is created you can deliver a NetRestore or asr image to the main data partitions without harming it in any way.