Imaging and OS X Lion Recovery Partitions

The Recovery Partition that comes in Lion seems to be getting in my way when I’m trying to build images. This was fixed in the latest build of DeployStudio (rc127) but, given that my DeployStudio, Casper Imaging Server and SIU environments act as my recovery partition for the most part, I just tossed it. If you do remove the recovery partition then you won’t be able to use FileVault. If that’s not an issue, first get the disk identifier: diskutil list When you see the entry, which should look something like disk0s4 (in fact that’s what I’ll use for this example), then remove it: diskutil eraseVolume HFS+ UntitledBlob /dev/disk0s4 If you note, the partitioning scheme for a recovery partition is Apple_Boot, a simple HFS. So to re-create, you should be able to use diskutil to partitionDisk, name it the same thing and clone the data back to it (I haven’t tried that yet, but I’m guessing if you keep the names the same and the partition as Apple_Boot that it would work). Or you can merge the partitions back together, although if you’re imaging it’s easier to just do this step in your workflow. If you want to go ahead and merge, use the disk0s3 (adducing that’s the actual OS volume) and disk0s4 (continuing on with the example from above), replacing with your actual volume name: diskutil mergePartitions HFS+ disk0s3 disk0s4 In a non-imaging environment I would just leave the recovery HD. It doesn’t use much space (~650MB) and it will come in really handy in the future.

5 thoughts on “Imaging and OS X Lion Recovery Partitions”

  1. One place you would need it is if you’re enabling FileVault 2 encryption. It needs the Apple-built Recovery HD partition to be present or FileVault 2’s encryption will not enable.

Comments are closed.