Hide Recovery HD after cloning an OS X installation

Sometimes when you clone an OS X installation, for example using Carbon Copy Cloner, it will create a Recovery HD partition but not hide it for you.

The “hidden” status of a partition is determined by it’s partition type – in the case of the Recovery HD partition, it’s set to type Apple_Boot and this hides it from Disk Utility and prevents the Finder from mounting it.

If you have one visible and want to make it hidden, then there are a few quick commands you can run in the terminal to fix it’s type;

First, find what device contains the Recovery HD that’s mounted:

mount | grep "Recovery HD"

This will return something like the following where I’ve hilighted the important bits in bold.

/dev/disk2s3 on /Volumes/Recovery HD (hfs, local, journaled)

We can see that the Recovery HD is /dev/disk2s3 in this example (it will probably be different for you, so don’t take my word for it!)

Next, run the following two commands, replacing /dev/disk2s3 with whatever you had returned above. The first command unmounts it from the desktop so we can have greater control over the device, the second one adjusts it’s partition type to an Apple_Boot partition so it stays hidden as it should be.

/usr/sbin/diskutil unmount /dev/disk2s3
/usr/sbin/asr adjust --target /dev/disk2s3 -settype Apple_Boot
This article was posted by Kai Howells. If you liked this content and have any technical work in the Melbourne area, say hello via my contact form or give me a call on 0419 361 653 - I cover most of the greater Melbourne area and my rates are competitive.

6 Responses to Hide Recovery HD after cloning an OS X installation

  1. Apart from hiding the partition from the Finder, does assigning the Apple_Boot partition type give the Recovery HD any other functionality that’s required by the recovery process? Will it be fully functional as a bootable recovery volume even if it’s an Apple_HFS partition?

    (Also, I note in 10.9.2 that the Recovery HD is exposed to Disk Utility.app, which can easily mount it and make it visible in the Finder. Is that new functionality?)

    Thanks, Steve

    • Hi Steve,

      I don’t know what special magic is assigned to a partition with Apple_Boot type. As for it appearing in Disk Utility – in my fresh 10.9.2 install it’s still hidden, maybe you enabled the showing of hidden partitions in Disk Utility via enabling the Debug menu and then selecting the option to Show every partition.

      defaults write com.apple.DiskUtility DUDebugMenuEnabled 1

  2. Thanks – this worked perfectly for me. I am currently on 10.9.5 and am upgrading to 10.10(.4). The installer was complaining about my non-standard partitioning scheme. Now I am able to have a Recovery partition on the 10.10 install. The only mod I needed was the ‘sudo’ in front of the asr command.

  3. Pingback: Hide Mac OS X Recovery partition - Programming and Technology

  4. Pingback: Ocultar partición Recovery en Mac OS X - Programming and Technology

  5. Pingback: Hide Recovery HD after cloning an OS X installation | Beyond The Mac

Leave a Reply

Your email address will not be published. Required fields are marked *