How to change the "Recovery HD" partition to type "Apple_Boot"?

Solution 1:

It seems that normal "umount" command is not suitable here, especially if Recovery partition is on system hard disk (SSD/HDD). I found working script on JAMFNation for that:

#!/bin/sh

RecoveryHDName="Recovery HD"
RecoveryHDID=/usr/sbin/diskutil list | grep "$RecoveryHDName" | awk 'END \{ print $NF }'\

/usr/sbin/diskutil unmount /dev/"$RecoveryHDID"
/usr/sbin/asr adjust -target /dev/"$RecoveryHDID" -settype Apple_Boot
/usr/sbin/diskutil info /dev/"$RecoveryHDID"*

The key is that you need to eject only this particular partition (you can do this from Finder also!) and only then execute: sudo asr adjust --target /dev/diskNsM -settype "Apple_Boot" where you should replace N and M with your Disk and Partition number.

Apple Recovery partition is used as emergency tool. In case you cannot boot to your system, you at least can try to do repairs.

To access Recovery partition, reboot your Mac and press and hold Cmd+R during startup/power on.

Solution 2:

At first:

umount -f "/Volumes/Recovery HD"

Then:

sudo asr adjust --target /dev/disk0s3 -settype "Apple_Boot"