Deleting the Mac OS X 10.7 Lion “Recovery HD” Partition
If you want to remove the Mac OS X 10.7 Lion “Recovery HD” partition, you’ll need to do a little bit of work because it’s a hidden partition. Hidden means it’s not just a matter of using your dual boot to go into 10.6 and then deleting it with Disk Utility.
Quick side note for devs with Lion Developer Preview: deleting and merging the Recover HD partition may not be a necessary procedure, but we won’t know for sure until Lion is finalized and shipping. The basis of this is the brief mention in the release notes that DP4 was not upgradeable to the final version, which sort of suggests you’ll want to format and perform a clean install once OS X Lion GM is released. Because of this, we are operating under the assumption that “Recovery HD” will get updated alongside the base Lion OS install, and therefore the old dev version won’t function with the final release – again, we don’t know for sure until Lion ships though.
Finally, if you don’t know what you’re doing, don’t muck around with partitions, diskutil, merging, or anything else, you could easily screw something up and lose all of your data. Ok enough with that, let’s get started.
Delete the Mac OS X 10.7 Lion Recovery HD Partition
There are a few ways to go about doing this, all methods will result in data loss which is the intention here, but I’ll point that out anyway. We’ll cover two methods: using the command line tool diskutil, and using the GUI app Disk Utility.
Deleting and merging a partition with diskutil from the command line
This is the most precise method I know of to remove the partition since it targets the recovery disk directly and merges it with the full Lion partition – if you’re not comfortable with the command line this is not for you.
- Launch the Terminal and type the following into the command line:
- This will print out your drives partition scheme and look something like this:
- Look for “Recovery HD” and see which identifier it is using, it this screenshot it’s disk0s4
- To remove that partition we use the following command (you can also use the volume name):
- The partition will be erased, you might want to do this with your standard Lion partition as well since you’ll be wiping the entire thing anyway. Regardless, you’ll now have a blank partition sitting around, so you’ll want to merge that with your other Lion partition:
- This will merge the two partitions, with disk0s3 absorbing the space from disk0s4 and expanding, it causes data loss so don’t expect this to preserve anything
diskutil eraseVolume HFS+ Blank /dev/disk0s4
diskutil mergePartitions HFS+ Lion disk0s3 disk0s4
The next approach is much more invasive because it formats the entire disk.
Removing the partition with Disk Utility by formatting the disk
Disk Utility will not display “Recovery HD” on it’s own because it’s a hidden partition, meaning you can’t just go into the app and delete it. What you can do though is format the entire drive though, which will then require a Lion clean install either starting from Snow Leopard or with a created installer DVD. This is sort of the nuclear approach but it works to delete the recovery partition too.
- Boot the Mac from a recovery DVD, USB key, or an attached drive
- Launch Disk Utility
- Right-click on the Disk (not the partitions) and select “Erase”
- Select the default Mac OS Extended (Journaled) as the file system, and give the drive a name
- Click on “Erase” to completely format the drive – you will lose all data on the drive and all partitions
This formats the drive giving you a clean slate to start from, but this is not necessarily the best approach because of the way Lion is delivered through the App Store, which would cause you to have to start from scratch.