OS X creates the recovery partition as an alternate boot solution for ease of reinstallation and troubleshooting.
It is not needed for normal operation, and as someone that's familiar with boot technology and options, the simplest option would be to simply delete the partition entirely and patch the partition table if needed.
Here is a stock layout:
Mac:~ me$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 250.1 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
You could merge partitions disk0s3 into the partition that precedes it (in this case) to effectively erase and then delete the Apple_Boot partition listed as Recovery HD. In this case, you would need to be booted to some other drive than disk0 to have both disk0s2 and disk0s3 unmountable (which would make them disk1 or higher in all likelihood).
diskutil mergePartitions JHFS+ "Macintosh HD" disk0s2 disk0s3
Should that not work, you might have to image Macintosh HD to another drive as an img file (or straight partition to partition) and then repartition hdisk0 to have just one partition and restore.
As to the deeper question, my guess is that the "hiding" of the partition isn't compatible with other non Apple tools and is confusing the issue - hence the advice to just remove it and count on alternate options to restore your system or boot externally in stead of the recovery HD.
I nearly had this nightmare after installing MacOS Mojave, then playing around with the partitions with Paragon (the only good disk editor left for MacOS).
Unfortunately it shows the trailing partition as “free” approx 180M.
So not knowing that this was the other GPT partition table reference I cleared it out.
Every time I came to run first aid on the whole disk I got the same error.
Also it says run first aid from recovery which I didn’t have...
So stumbled on the MBR patch from these guys:
https://www.insanelymac.com/forum/files/file/944-mojave-mbr-hfs-firmware-check-patch/
This was brilliant and allows one to install easily to USB without having to use the APFS.
Then you need to disable SIP
So boot the Recovery on the USB
Then choose terminal.
Issue the following command:
csrutil disable
[see https://amp.reddit.com/r/osx/comments/3hv3kk/update_on_rootless_the_configuration_mechanism/#ampf=undefined
For more details]
Then type:
reboot
Hold down Alt key and then boot back into OS on main disk.
Then using Paragon Hard disk Manager (well worth it!)
https://www.paragon-software.com/home/hdm-mac/
Check your recovery partition (you can use diskutil list),
Delete it (make sure you back it up in case!)
I had to add another “empty” or “free space” after my main os (800MB)
I.e :
EFI:
Macintosh HD:
Free Space:
Other MacOS:
Then Copy the Recovery Volume from your USBstick using Diskutil or Paragon.
Now even if you select the Apple_Boot GUID in Paragon you still need to issue the following command: (replace TargetVolume with the volume you have (or have just created at the end of the main OS, ie I my case /dev/disk0s3)
[See the following website for more info on this command.
https://www.lifewire.com/create-os-x-recovery-hd-on-any-drive-2260909]
sudo asr adjust --target /dev/TargetVolume -settype Apple_Boot
Then this makes the volume dissapear from disk Utility (but not from Paragon HDM).
Then reboot into the recovery volume and run the following:
Diskutil umountDisk /dev/disk0
[allows disk to be verified]
DiskUtil verifyDisk /dev/disk0
[verify main disk]
Diskutil repairDisk /dev/disk0
[repair Disk0]
Then issue the final command to restore SIP back to normal
Issue the following command:
csrutil enable
Then type:
reboot
Hold down Alt key and then boot back into OS on main disk.
You can now run the first aid on the main disk as well as the volumes and it should be fine.
Also CMD -R should now now bring up the Recovery HD.
Good luck to anyone else, just glad I have Paragon and Carbon Copy Cloner, but cmd line options are still needed.
Best Answer
Short answer:
It will be possible.
More elaborate answer:
If you leave the Recovery HD intact, you can still boot from it later on as the boot process Linux uses (usually GRUB these days) will not touch the ability to use the
Alt
key to boot from any attached bootable partition.So, pressing
Alt
at computer startup will then present you with two options:Windows
(even though Linux is installed; some distributions may show their name though)Recovery HD-<version>
(<version>
is the version of OS X at the time you installed OS X, which created the Recovery partition)Additional: You have a MacBook Pro (Mid 2014). So, you can always reinstall the original version of OS X (which may be either OS X 10.9 Mavericks or OS X 10.10 Yosemite), which came with your computer as you can use the Internet Recovery even if your internal Recovery HD is gone entirely.
To start the recovery process, hold down
Cmd
+R
at computer startup. If a Recovery HD is found, it will be used. Otherwise, the Internet Recovery is used. To specifically force the Internet Recovery, hold downCmd
+Alt
+R
at computer startup until you see a spinning (or blinking) globe.More information can be obtained here: OS X: About OS X Recovery