Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.7 : Enable Recovery HD after restore from Time Capsule/File Vault 2. System 10.7
File Vault 2 and embedded 'Recovery HD' disk are new additions to OS X in Lion release.  

A fresh OS X Lion installation creates 'Recovery HD' by live re-partitioning 'Macintosh HD'. The recovery disk is 650MB in size (as of 10.7.2), of partition type Apple_Boot, and therefore, will be hidden during normal usage by OS X user interface. It does not show up in Finder, and not even 'Disk Utility.'

If the recovery disk 'Recovery HD' is proper, booting up a Mac without File Vault 2 while holding down the Option key will result in listing 'Recovery HD' as an alternative to 'Macintosh HD' for booting the machine up. For Macs with File Vault 2, only holding down the Cmd+R key combination will boot 'Recovery HD.'

The 'Recovery HD' of a Mac without File Vault 2 contains 'Base System Install', which is a minimal OS X kernel plus useful utility applications (Disk Utility, Time Machine, Network Utility, Pasword Utility). The main purpose is to allow partitioning a hard disk and restoring the system from a Time Capsule via the Time Machine application.

The 'Recovery HD' of a Mac with File Vault 2 does not contain 'Base System Install,' but only CoreStorage components and a minimal kernel for authenticating a user to Core Storage, to get a File Vault 2 (Whole-Disk-Encryption) protected disk mounted. Therefor, once File Vault 2 is turned on, your Mac will loose the ability to boot 'Base System Install'. The only way to start a Time Capsule restore is to boot from a Lion Installation DVD (or USB), if you had one made from the downloaded Lion installation app from the AppStore (instructions are widely written in web articles, please search the web).

When a Lion Mac is restored from Time Capsule via the Time Machine application, as of 10.7.2, the 'Recovery HD' will NOT be recreated. A Mac with File Vault 2 previously enabled will also be restored with File Vault 2 disabled; i.e. the disk will NOT be encrypted (this is right thing to do IMO). Without 'Recovery HD', File Vault 2 cannot be enabled anymore. This is a BIG problem for Mac owners who need stronger assurance of data security.

This article is a collection of my experiences in fixing this plight I had to face after restoring my Mac after my Seagate Momentus 500GB (G-Shock) crashed badly.

As with everything related to direct disk manipulations, here is an important disclaimer: The suggestions here are merely suggestions that may work, complete data loss may result, the risks are yours and only yours to bear. Please do not do anything I said if you are not willingly to bear all consequences.

First, let's be clear - if you had not backed up your 'Recovery HD' all bets are off for a quick and easy fix.

How to backup 'Recovery HD'

Apple has released the Recovery Disk Assistant that will help create a backup of 'Recovery HD' on a USB Disk, *provided* that your 'Recovery HD' is healthy. Unfortunately, tthere is no documentation on what is healthy. It turns out that here is a wisdom that I learned through the ordeal : If you intend to enable File Vault 2, perform backup of 'Recovery HD' TWICE, i.e. get yourself two 1GB USB Disk. Do the first backup before you turn on File Vault 2 to keep a copy of 'Recovery HD' with 'Base System Install'. Do a second backup after you turn on File Vault 2 to keep a copy of 'Recovery HD' which contains Core Storage aware mini kernel to mount your encrypted disk.

The one you need to restore 'Recovery HD' is the first backup (made before File Vault 2 enabled).

What if you had done neither? Based on three days of experimentation with a few different Macs, the following exceptions may save your day: make a backup from any Mac with OS X Lion 10.7.2 that does not have File Vault 2 enabled. It worked for me, but Apple said you should not do this; please weigh the risks yourself. The worst consequence here is that you will not be able to boot 'Recovery HD' or it does not appear as boot choice.

WARNING: Do NOT use a backup of 'Recovery HD' from other Mac that has File Vault 2 enabled.

CASE 1) You bought your Mac with OS X Lion

If your Mac get serviced by Apple and the hard disk got replaced, if you had OS X Lion when you first purchased the Mac, the new hard disk will have 'Recovery HD'. Make a backup of your 'Recovery HD'  before you proceed to restore from Time Capsule. You will still have 'Recovery HD' after restoring from Time Capsule.

CASE 2) Clean-install minimal OS X, Restore from Time Capsule

If you read this far and cannot get yourself a copy of backed-up 'Recovery HD', here is the only remaining alternative for you to get back 'Recovery HD' so that you can enable File Vault 2 after that:
  • First, get or make yourself a 'OS X Lion Install' DVD or USB. This is very important.
  • Do a minimal OS X installation, i.e. install the bare minimum by customizing your installation. This force the creation of 'Recovery HD'
  • Once installation complete, you can boot up from 'Recovery HD' (hold down Option or Cmd+R during boot). Then choose restore from Time Capsule.
CASE 3) Partition hard-disk, restore 'Recovery HD' from backup, restore from TimeCapsule:

Here is a short-cut to get your 'Recovery HD' back if you have a backup copy, and comfortable with command line interface.

a. First, get or make yourself a 'OS X Lion Install' DVD or USB. You will need this. If your Mac get serviced by Apple and the hard disk got replaced with earlier OS X version, but you had upgraded to OS X Lion prior to servicing, then, create a temporary account, do software update to the latest OS X version, sign on AppStore, re-download your copy of OS X Lion, make a 'OS X Lion Install' DVD.

b. Boot up 'OS X Lion Install DVD / USB' (not backed-up 'Recovery HD' USB).

c. This step is going to re-partition your harddisk, everything will be lost, be warned!

Choose Disk Utility. Click on disk containing 'Macintosh HD', on the right pane, click on partition. Under 'Partition Layout', pull down and select 2 partitions. Click on the bottom parition, on the right pane, enter 'Recovery HD' for name, 'Mac OS Extended (Jorunaled) for 'Format', 1GB for size (need only 0.65GB). Click on top partition, 'Macintosh HD' for 'Name', accept default for size, 'Mac OS Extended (Jorunaled) for 'Format'. Click on 'Apply'. Once done, quit Disk Utility (Cmd-Q) to return to install menu.

d. This step is going to modify the GPT partition table of your Mac's hard disk. Usually very RISKY, but at this point, you are recovering and data is safe in Time Capsule, so, risk is lesser, but still you have been warned!

Click on 'Utilities' on the menu bar, then click on Terminal.

Notes: You will need to use this command very often 'diskutil unmountDisk disk0' (case sensitive). The right angle bracket '>' indicate the commands you should enter. Depending on your disk size, the numbers under columns 'start' and 'size' should be all different from what are shown.
> diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *90.0 GB    disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS OSXviiSSD               89.0 GB    disk0s2
   3:                  Apple_HFS Recovery HD             1.07 GB    disk0s3

Note: The last line for yours read 1.x GB, it is okay. How exact is not important.
> diskutil unmountDisk disk0
> gpt show disk0

      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6         
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  310902592      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  311312232    1269544      3  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
	...

> diskutil unmountDisk disk0

> gpt remove -i 3 disk0

> diskutil unmountDisk disk0

> gpt add -i 3 -s 1269544 -t %Apple_Boot% disk0
-OR-
> gpt add -i 3 -s 1269544 -t %426F6F74-0000-11AA-AA11-00306543ECAC% disk0

> diskutil unmountDisk disk0
> gpt show disk0

      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6         
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  310902592      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  311312232    1269544      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
	...

> diskutil unmountDisk disk0
> gpt  -l Recovery\ HD disk0s3

> diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *90.0 GB    disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS OSXviiSSD               89.0 GB    disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

Now, mount your backed-up 'Recovery HD' USB. Wait a couple of seconds.
> diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *90.0 GB    disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS OSXviiSSD               89.0 GB    disk0s2
   3:                 Apple_Boot                         650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *1.0 GB     disk1
   1:                 Apple_Boot Recovery HD             650.0 MB   disk1s1

Mine is mounted as disk1. Depending on how many HDD is in your Mac, it may be different. So, do carefully identify the right disk number! You have been warned!
>  dd if=/dev/disk1s1 of=/dev/disk0s3 bs=32768

This command is the reason why you should not boot from the 'Recovery HD' backup; you cannot 'dd' from a mounted volume. If you follow and get this far without hiccups, things are working out for you. If things do not work out, please remember you can do CASE 2 method.

So, did it work? Reboot, press 'Option' and see if 'Recovery HD' appears; then pick it, and see if 'Base system Install' booted (should look the same as when you booted from DVD / USB).

f. In this step you will restore your Mac from the Time Capsule.

Congratulations if you got back 'Recovery HD' and you are ready to restore from Time Capsule.

g. Once you finished restoring and rebooted, check if 'Recovery HD' is really good.

Download 'Recovery Disk Assistant' from Apple, install it, and open the application. If it does not complain about 'Recovery HD' being corrupted, mission accomplished.

h. Make a backup of your 'Recovery HD'. This copy is made before turning on File Vault 2.

i. Do Time Machine backup on your restored Mac before turning on File Vault 2.

j. Enable File Vault 2.

[crarko adds: OK, there are so many caveats here I'm not sure where to start. I would strongly urge anyone trying this to first vet the process on a test machine with no vital data. There are a lot of places where things could go wrong and doing it once when you can afford to rebuild the system from scratch if they do can be a lifesaver.

If you can't try this on a test machine, and need to do this kind of recovery, you may want to seriously consider hiring a professional for the task.

Also please note that I did fairly minimal editing of the recovery steps, since I didn't want to introduce any errors into the procedure. Please forgive any grammatical slips which have resulted from this.]
    •    
  • Currently 3.25 / 5
  You rated: 5 / 5 (4 votes cast)
 
[17,348 views]  

10.7 : Enable Recovery HD after restore from Time Capsule/File Vault 2. | 4 comments | Create New Account
Click here to return to the '10.7 : Enable Recovery HD after restore from Time Capsule/File Vault 2.' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.7 : Enable Recovery HD after restore from Time Capsule/File Vault 2.
Authored by: llee on Jan 27, '12 09:00:14AM

Normally you can get the Recovery HD partition by performing a fresh Lion installation or an overlay installation (installing to a volume where Lion already exists). The installer adds the partition to whatever drive contains the destination volume. As of now don't use anything older than a 10.7.2 installer, which you can always get by re-downloading either through the Mac App store, or by using Internet recovery (cmd-opt-R if your computer shipped with Lion pre-installed). There's hardly any reason to fear a Lion overlay install, it's hardly destructive at all (certainly not so much so as the legacy Archive and Install routine). You just have to remember to restore all system updates, Java machine, Xcode, maybe a few other items depending on your system customization. If you use Internet Recovery, you can interrupt the installation when the computer reboots the first time, then create an installer disk from your downloaded copy which exists in the Mac OS X Install Data folder on the installation's target volume. (That little trick might make a pretty good hint on its own.)



[ Reply to This | # ]
10.7 : Enable Recovery HD after restore from Time Capsule/File Vault 2.
Authored by: Fofer on Jan 28, '12 08:38:07AM

Also, the latest beta of Carbon Copy Cloner provides support for cloning the Lion Recovery HD partition.



[ Reply to This | # ]
10.7 : Enable Recovery HD after restore from Time Capsule/File Vault 2.
Authored by: matsw on Jan 27, '12 12:54:37PM

Much of the information in this hint is contrary to what I observe on several Macs on which I have 10.7.2 and File vault 2. On my macs, when I hold cmd-R at startup, I do get the minimal system in which I can use Disk Utility, Safari, or re-install OSX. And I have often used the Disk Utility on the minimal system to check the filesystem on the main partition. So I do not really understand the point of this hint.



[ Reply to This | # ]
10.7 : Enable Recovery HD after restore from Time Capsule/File Vault 2.
Authored by: mnewman on Jan 29, '12 05:28:59PM

Be careful of the overlay install. I did this recently and it worked fine. Unfortunately, the overlay install overlaid a System plist file that I had edited (/System/Library/LaunchDaemons/com.apple.nfsd.plist) which resulted in the failure of all of my XBMC installations to connect to the nfs share where the media is located. It took me the better part of a day (with some help) to figure this out.

---
http://www.mgnewman.com



[ Reply to This | # ]