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.]
  Post a comment  •  Comments (4)  
  • Currently 3.25 / 5
  You rated: 5 / 5 (4 votes cast)
 
[16,645 views] Email Article To a Friend View Printable Version
10.7: Setting duration before files are locked System 10.7
As you know, Lion locks files that have not been changed for 2 weeks, so that you have to unlock them before editing them.

There is a control to change the length of time before a file is 'locked' by Lion.

In System Preferences » Time Machine » Options, there is a control to set the length of time after the last edit before files are locked.

The options are 1 day, 1 week, 2 weeks (default), 1 month, 1 year.

I presume that there's a corresponding plist setting that you can 'defaults write' to values not in the dropdown list.

[crarko adds: This is one of those things that's obvious once you know about it, but probably wouldn't think to look for it under Time Machine preferences if you didn't.]
  Post a comment  •  Comments (5)  
  • Currently 4.00 / 5
  You rated: 2 / 5 (10 votes cast)
 
[5,245 views] Email Article To a Friend View Printable Version
10.7: Launchpad - Organize by folders System 10.7
As we all know Launchpad in Lion behaves like iOS on our iPhone and iPad devices.

To create and organize folders on your Mac using Launchpad, open Launchpad then hold down the Option key and while your apps are shaking you can create and organize them to desired folders.

Just makes it easy, hope you find the tip helpful.

[crarko adds: This points up a divide we may see amongst Mac users; if you use iOS something like this feels natural to do, and obvious. If you don't use iOS, I imagine this behavior is a bit odd, and you may not think of it. I still have reservations about the mixed metaphors of Lion, although fortunately none of them are required to make good use of the system.]
  Post a comment  •  Comments (10)  
  • Currently 3.13 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (8 votes cast)
 
[13,983 views] Email Article To a Friend View Printable Version
10.7: Change the Dashboard background System 10.7
Mac OS X Lion introduced Mission Control and a whole new way to organize desktops. In the process they made it possible to set a different image for each Desktop, but in the Dashboard we're stuck with a boring gray bathmat texture that can't be changed. But it turns that in Lion the new Dashboard is just another Desktop after all.

I wrote a random image fetching Dashboard widget (ImagesForever) that has a 'set desktop' button. 'Set Desktop' normally applies to the current desktop, but in Lion the Dashboard isn't an overlay, but a whole separate space of its own. So in Lion 'set desktop' now applies to the Dashboard background. A very cool and unexpected side-effect.

The widget's code just calls the usual AppleScript to set the desktop background, so it should be very easy to make a dashboard droplet that does the same thing. The AppleScript to set the desktop is quite simple:

tell application 'Finder' to set desktop picture to POSIX file '/path/to/MyImage.jpg'

[crarko adds: It's pretty well known that the Dashboard in Lion is just a Space, but this is a good application of existing knowledge.]
  Post a comment  •  Comments (1)  
  • Currently 4.29 / 5
  You rated: 3 / 5 (7 votes cast)
 
[10,311 views] Email Article To a Friend View Printable Version
10.7: Applescript to escape Zoomed In screen System 10.7
I was trying to get full screen zoom to work in Lion (don't know why it doesn't) and I read a hint that told me to go to System Preferences » Universal Access and turn the 'Zoom in window' checkbox on and back off again. It worked fine for me but when my friend did it he got stuck zoomed into the middle of his screen.

After many unsuccessful attempts to escape, including remote screen sharing, shortcut keys to disable screen sharing (which again I don't know why they don't work in Lion) we succeeded with this plan and this might help you if all else fails. I don't know if rebooting would help, he didn't want to risk losing his code so it was only last resort.
  • On another Mac I wrote and tested an AppleScript. I saved it as plain text and made it executable using chmod 0755 on the file.
  • We ssh'd it to his computer so he could execute it.
  • He started Terminal using Spotlight.
  • He pressed Command+N several times until a Terminal window cascaded itself into view.
  • He ran the script file and presto, it worked.
I hope you don't have to do this, but at least it gave some practice in User Interface Scripting. Here's the script:
#!/usr/bin/osascript

tell application "System Events" to set frontmost of process "System Preferences" to true
tell application "System Events"
  tell process "System Preferences"
    tell radio group 3 of tab group 1 of window 1
      tell radio button 2
        click
      end tell
    end tell
  end tell
end tell

[crarko adds: Nothing really earthshaking here, but I'm a soft touch for persistence and creativity in problem solving.]
  Post a comment  •  Comments (5)  
  • Currently 3.60 / 5
  You rated: 3 / 5 (5 votes cast)
 
[4,471 views] Email Article To a Friend View Printable Version
10.7: Expand an application's windows in Mission Control System 10.7
When you enter Mission Control, an application's windows are stacked atop each other. If you're after a particular window, but it's not the frontmost one in an application, it could be difficult to identify it.

To solve this, after you've entered Mission Control, move the mouse cursor over a stack of windows and scroll up. They fan out somewhat from each other, allowing you to see more of the windows' contents. Other applications and the Desktop dim.

To exit this mode, either scroll down or click off in one of the dimmed areas.

Oddly, Apple did not choose to use the 'pinch out' gesture for this feature. This is unfortunate, since it's a much more intuitive way of commanding stacked items to spread out.

[crarko adds: I tested this, and it works as described. I tried the pinch out gesture with the Magic Trackpad (in 10.7.2), and it still didn't work, like the hint says.]
  Post a comment  •  Comments (8)  
  • Currently 3.40 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[6,973 views] Email Article To a Friend View Printable Version
10.7: Change of keyboard type System 10.7
One of my cats managed to change my French keyboard to Dvorak.

As I had an automatic password requirement, I could not log in again. My password was not recognized.

I managed to log in to another account, which was not admin, and changing the keyboard type in that account. This worked and I accessed my primary account with my regular keyboard. I just had to change the keyboard from Dvorak back to French.

[crarko adds: I haven't tested this one. He doesn't say so in the hint, but I assume that Fast User Switching was the method used to get back to the admin account, since then the chance to type in the password was allowed. I also didn't check this, but I'd guess booting to the Recovery partition should give one the means to change the keyboard type.

Also, watch out for those cats! At least my dogs don't walk on the keyboard.]
  Post a comment  •  Comments (6)  
  • Currently 2.60 / 5
  You rated: 4 / 5 (5 votes cast)
 
[6,772 views] Email Article To a Friend View Printable Version
10.7: How to install iSync System 10.7
After updating to OSX Lion I realized that syncing my iMac to my iPad/iPhone no longer gave me the option to be notified about pending changes to my iMac's iCal and Address Book. Given the potential to wipe out all of my data with a single click a fix was needed.

Apple Support was not able to find a solution. Having an older Snow Leopard Time Machine Backup of my machine I searched for iSync in the Applications Folder, copied and pasted it to an external HD, and then copied and pasted into the Applications Folder on the Mac running Lion.

Opening the iSync folder allowed me to set the parameters that I wanted and upon the next sync the hoped for warning message popped up as expected.

[crarko adds: I haven't tested this one. I thought there was a previous hint about this but searching yielded none, so here it is.]
  Post a comment  •  Comments (6)  
  • Currently 4.17 / 5
  You rated: 4 / 5 (6 votes cast)
 
[14,193 views] Email Article To a Friend View Printable Version
10.7: Press and hold hotkeys to quickly view Mission Control System 10.7
You can press and hold any of the hotkeys on a Mac keyboard to temporarily view that function.

Here's a cool trick that could be useful if you use hotkeys or keyboard shortcuts to activate Mission Control, the Dashboard, or Launchpad (i.e. F3/F4).

You might be used to tapping a hotkey once to activate that function and then tapping it again to deactivate (i.e. F3 for Mission Control). However, if you press and hold a hotkey, without releasing, that particular function will only remain active for as long as you hold down the key. For example, press and hold the Mission Control/Exposť hotkey, and it will disappear as soon as you take your finger off the key. Give it a try!

While holding the Mission Control key, you can still select windows, or create new Spaces using the mouse. This works with keyboard shortcuts too, such as Ctrl+Up, the default keyboard combo for Mission Control).

Incidentally, if you're annoyed the Show Desktop mouse gesture has gone in OS X Lion, you can simply hold down Command and tap the Mission Control/Expose hotkey. That will do the same thing.

[crarko adds: I tested some of these on my old MacBook, and they work fine. I'm sure the utility will be even greater with the full size keyboards.]
  Post a comment  •  Comments (10)  
  • Currently 3.00 / 5
  You rated: 4 / 5 (8 votes cast)
 
[9,032 views] Email Article To a Friend View Printable Version
10.7: Restart Mission Control System 10.7
For whatever reason, Mission Control was acting strange and not correctly showing my desktops.

Mission Control is apparently still tied to the Dock process. So to restart it go to Terminal and type:

killall Dock

As with previous OS X version, this will restart the Dock and Expose/Mission Control. This isn't really a new hint. More of a confirmation that this technique still works in Lion.

[crarko adds: No, not new or earthshaking. But sometimes it's comforting to know that old techniques are still applicable to new features.]
  Post a comment  •  Comments (3)  
  • Currently 3.71 / 5
  You rated: 3 / 5 (7 votes cast)
 
[9,755 views] Email Article To a Friend View Printable Version