How to Restore the Recovery Partition in OS X 10.10 Yosemite

As you know, the OS X partition Recovery is quite important with many available features such as password reset, ternimal, repair disk, reinstall OS X … However, by some reasons, It is gone when holding the Option key and even not available in Startup Disk.

No Recovery Disk in Startup Disk

HOW TO RESTORE YOSEMITE RECOVERY PARTITION?

Step 1: Firstly, use the following command line to make sure Recovery HD exists.

diskutil list

Step 2: Enter the following command line to show all CoreStorage of Logical Volume

Sudo diskutil cs list

This command will show all results in order: Group(LVGs)–> member (PVs)—> exported volumes(LVs).
You have to copy the Logical Volume UUID at member LVs.

Step 3: Enter the following command line.

diskutil coreStorage revert LVs_UUID

Step 4: Restart the Mac and hold the Option key to see the result.

how about el capitan ?