Our thinking


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

7 thoughts on “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

    1. 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. Works perfect (with sudo before asr, as mentioned) even under 10.12 Sierra, where I installed the Recovery HD manually together with Fedora Linux and Windows 8. Thanks a lot …
    BTW Windows 8 (no more 8.1, not to speak of 10) shows the contents of the macOS partition.

Leave a Reply to ConradCancel reply