44

For whatever reason, one of our macs didn't make a recovery partition when it upgraded to Lion.

Is it possible to add a recovery partition after the fact?


To be clear - on a normal mac, the recovery partition is hidden in both the Startup Disk system preference and the Disk Utility. You can only see it from the command line with a direct command, diskutil list or enabling the debug menu in Disk Utility. It also shows up if you boot with the option key held or if you successfully boot to recovery with Command-R a.k.a. +R during boot.

Warning - this question and answer ONLY APPLY to 10.7.x Lion - using the Lion installer to recreate recovery on newer OS can and will cause problems due to drivers not being present for newer OS and hardware.

5
  • 1
    By any chance, was Lion installed onto a RAID volume on that Mac? The recovery partition isn't supported for RAID volumes. Some more detail can be found here. You can always install Lion to an external device to get a recovery partition that way. It might be possible to clone this partition, but I haven't tried. This article goes into some more detail.
    – Gauzy
    Jul 29, 2011 at 0:29
  • @gauzy - thanks for the heads up. I need to delve into this - what does the partition look like? is it hidden from view from df and diskutil list and Disk Utility or is it plainly visible there? Also - should it show up in startup disk system preferences? (mine is a iMac / single 1TB internal HDD - nothing remotely exotic about it(
    – bmike
    Jul 29, 2011 at 3:27
  • 2
    It won't show up in Disk Utility or Startup Disk, but <pre>diskutil list</pre> is able to see it.
    – Gauzy
    Jul 29, 2011 at 13:43
  • 2
    I should not offer this as an answer until after I have tested with FileVault 2, but for your information: in a private forum, someone drew attention to Removing and rebuilding a malfunctioning Recovery HD partition « Der Flounder — as I understand it, allows creation without use of a full installer. Dec 11, 2011 at 13:54
  • 1
    Another place the Recovery HD partition is visible is the System Information utility (aka System Profiler). It won't be listed in the overview (the Storage tab of the "About This Mac" window), but it will appear in the full report you get by choosing File > Show System Report, then selecting your HD's attachment bus in the sidebar. BTW, you can open System Information directly into the full report by holding the Option key, and choosing System Information from the Apple menu. Dec 30, 2011 at 17:21

9 Answers 9

42

First, open a Terminal.

Status before:

$ diskutil list
/dev/disk0
  #:                       TYPE NAME                    SIZE       IDENTIFIER
  0:      GUID_partition_scheme                        *128.0 GB   disk0
  1:                        EFI                         209.7 MB   disk0s1
  2:                  Apple_HFS Macintosh HD            127.8 GB   disk0s2

Get Lion Recovery Update v1.0 (431.91 MB)

Mount RecoveryHDUpdate.dmg

$ hdiutil attach ~/Downloads/RecoveryHDUpdate.dmg

Extract data from RecoveryHDUpdate.pkg

$ pkgutil --expand /Volumes/Mac\ OS\ X\ Lion\ Recovery\ HD\ Update/RecoveryHDUpdate.pkg ~/Desktop/RHD

Mount RecoveryHDMeta.dmg (in the RecoveryHDUpdate.pkg package)

$ hdiutil attach ~/Desktop/RHD/RecoveryHDUpdate.pkg/RecoveryHDMeta.dmg

Run tool that will finally resize current partition and create recovery

$ ~/Desktop/RHD/RecoveryHDUpdate.pkg/Scripts/Tools/dmtest ensureRecoveryPartition / /Volumes/Recovery\ HD\ Update/BaseSystem.dmg 0 0 /Volumes/Recovery\ HD\ Update/BaseSystem.chunklist
Creating recovery partition: finished

Status after:

$ diskutil list
/dev/disk0
  #:                       TYPE NAME                    SIZE       IDENTIFIER
  0:      GUID_partition_scheme                        *128.0 GB   disk0
  1:                        EFI                         209.7 MB   disk0s1
  2:                  Apple_HFS Macintosh HD            127.2 GB   disk0s2
  3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
6
  • 1
    This is a very useful hint. I have just applied this to two disks and it appears to have done the job just fine. The only thing that concerns me is that one does not need administrative privileges to run dmtest… Thank you! Jun 14, 2012 at 20:08
  • 10
    This is the best answer, since it actually only recreates the Recovery HD and nothing else, by using Apple's own program for doing so. Thumbs up! Jul 1, 2012 at 9:31
  • 1
    Thumbs up, this worked flawlessly.
    – Nick Forge
    Jul 19, 2012 at 10:32
  • 1
    Any idea on how to achieve the same with Mountain Lion?
    – pgb
    Nov 27, 2012 at 11:54
  • This worked for me, but only using the Lion Recovery BaseSystem.* files. Using the ones from the latest Moutain Lion installer caused an error. Is there a problem if I'm running Mountain Lion, but my recovery partition is the one from Lion?
    – nwinkler
    Feb 27, 2013 at 7:07
16

Rerunning the Installer works for OS X 10.7, 10.8 and 10.9 - running the recovery disk assistant isn't a good idea if you are running 10.8 or newer OS as well as hardware that ships with newer builds of OS.

The Lion Recovery Disk Assistant can make a backup copy of the recovery partition.

The Lion Recovery Disk Assistant lets you create Lion Recovery on an external drive that has the same capabilities and limitations as the built-in Lion Recovery. Just as a backup copy of a good file needs to be made before the file comes upon it's demise, this tool will not help if you start with a partition that is missing or broken.

Re-running the Lion installer will create a workable recovery partition.

To get the Installer (since we didn't save it and it deletes itself on running the first time).

  1. Start the App store and pick any view except Purchased.
  2. Hold the option key while selecting Purchased.
  3. Download the Lion Installer

It took a good 35 minutes to run the installer again. Disk Utility hides the Recovery HD (and other partitions by default) unless you enable a debug menu. You can use the diskutil list to see the Recovery HD if you don't mind terminal.app commands.

mac:~ mike$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            999.3 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

The debug menu looks as follows - selecting show every partition will let you see whether your Recovery HD is on your drive.

enter image description here

https://apple.stackexchange.com/users/8527/z4mba pointed out these hidden commands from this MacWorld article. I only needed to turn on/off the one command:

  • defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true

I don't know if you can move a Recovery HD around like a normal partition or need the other defaults write command to roll your own recovery HD, running the Lion installer a second time was fine for my needs. As many have pointed out, it appears that the recovery contents are not universal and instead customized for the specific hardware, so recreating it from the official tools is much preferred unless you wish to test well and are saving time by automating tens or hundreds of macs and can control for hardware differences in your process.

6
  • 3
    "The Lion Recovery Disk Assistant lets you create Lion Recovery on an external drive that has the same capabilities and limitations as the built-in Lion Recovery." Not quite - with 10.7.2 you won't be able to enable "Find My Mac" if you don't have an "internal" revovery HD
    – Guy
    Oct 18, 2011 at 6:03
  • True enough. The recovery partition contents are the same - but FMM needs it to be on the same physical volume as the boot volume to work its magic. I'd call it a limitation of the FMM system as implemented to be exactingly precise but perhaps that's splitting hairs too finely.
    – bmike
    Oct 20, 2011 at 15:20
  • Re-running the Lion installer: This will erase my data, right? (P.S. No internal recovery HD means no FileVault either) Nov 22, 2011 at 10:55
  • I would not recommend, as a habit, copying an existing Recovery OS to anything other than a disk that hosts a clone of the original Mac OS. Not all recovery systems are equal. Dec 11, 2011 at 14:01
  • Will this work even after I upgraded to Mountain Lion (or beyond)? Will this downgrade my OS, then? Maybe you'll want to re-accept @lloeki's answer as the recommended way as that procedure will exactly solve the problem without any side-effects.
    – Olfan
    Nov 7, 2012 at 11:50
4

If you reinstall OS X from App Store, it also recreates a recovery partition. I just tried it on a VM. First I removed the Recovery HD partition. Then I reinstalled OS X from App Store:

It took about two hours, and after that I had a working recovery partition again.

Reinstalling OS X over an existing installation is similar to upgrading to a new major version of OS X, or it keeps user files and settings in place but replaces system files with new versions. Apple should call it something less scary like "repairing OS X", because it is the solution to a lot of issues like this, and it is not such a drastic operation especially if you have backups.

Upgrading to a new major version of OS X will also add a missing recovery partition.

Reinstalling OS X is also recommended by SuperDuper's developer:

Actually, you can easily recreate the recovery partition by simply reinstalling Lion from the App Store. (This has the additional benefit of updating the recovery partition with the most recent data, too.)

Carbon Copy Cloner has an option to add a recovery partition, but it needs to copy the recovery partition from another disk or a backup archive. If your Mac doesn't have a recovery partition, Carbon Copy Cloner recommends reinstalling OS X:

1
  • Carbon Copy Cloner is verified to work. I used CCC version 3.5.7 in trial mode to copy the Startup disk and CCC warned that the "Recovery Partition" was missing and offered me to copy that too.
    – Pro Backup
    Jun 28, 2018 at 10:23
2

While all of the solutions outlined in this discussion will probably work, if you're using the latest version of OS X someone was kind enough to create an AppleScript that does the entire process automatically without having to run any commands from your terminal or trying to carefully manage system partitions.

I've tested it out on Mavericks (10.9.4) and it worked great. After running the tool, I was able to enable FileVault 2 which previously refused to activate because my machine was missing a recovery partition.

2
  • Worked for me. I resized the main OS partition using gparted on Linux (because Disk Utility in Recovery would not let me) and then did fsck in OS X. I had moved the Recovery to be adjacent to the OS partition (so it moved to the left 200 GiB) and that resized the Recovery partition to be 'different' (usable but not recognised by FileVault 2; probably a check the enabler does).
    – Tatsh
    Sep 14, 2014 at 12:53
  • If you choose to re-do partitions not in OS X but with something like gparted then first disable FileVault in OS X. In gparted or similar, delete the recovery partition (seriously). Then do your partition work. Make sure to leave enough room for another recovery partition to be made. Once booted back into OS X, run Recovery Partition Creator, then you can re-enable FileVault and it should work. As always, make backups (even if it takes a long time, it is worth it)!
    – Tatsh
    Sep 18, 2014 at 8:29
1

Alternatively, you can use Carbon Copy Cloner (it has free 30 day trial). From CCC, follow these instructions:

  1. Click Window -> Disk Center.
  2. In Disk Center, click the Recovery HD tab.
  3. Click "Create a Recovery partition for this volume".
  4. Done!
1

Nice article above and reminds me to create an image of recovery partition as well as a backup.

if you don't have recovery HD or if that has been deleted for any reason:

Ref: to my discussion: https://discussions.apple.com/message/22563466#22563466

I have just tested it by re-installing Mac OSx, which worked like a charm. Here are the steps

if you have existing Mac partition with data, please create a backup or image of that partition (because that will be erased)

  1. I used a Mt Lion dvd and booted the mac from it and started the disk utility

  2. I created 2 partitions -> one with 1 GB space and named "Recovery HD" and second with all the remaining space and named " Macintosh HD", applied the changes, run disk repair on both partition (to be safe)

  3. then back to disk utility and re-installed OSx from DVD to Macintosh HD partition.

  4. after finish and reboot with Option key, you will get your recovery partition working

  5. now if you wana restore your old HD image just go to disk util and restore image

Ref: http://support.apple.com/kb/ht4718

sanjay

0

You should be able to access and inspect an existing recovery partition from the disc utility's debug menu. This is a hidden menu which can be revealed using these commands:

Enable hidden disk image formats and debug menu in Disk Utility

Hope this helps...

2
  • The defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true command lets me see all the partitions (including recovery ones) - it's not clear how to create them, copy them, make them hidden yet, but I'll poke around if the installer doesn't create one for me by running it a second time. Awesome find!
    – bmike
    Jul 29, 2011 at 16:47
  • This answer didn't help create the partition - the installer did create the partition and write the data into the partition to make it workable - it just needed to be run again.
    – bmike
    Aug 9, 2011 at 14:40
0

I apologize if I've misunderstood or perhaps not followed your guidelines with respect to providing an answer so if I get booted out I understand, however I believe information I obtained from your forum brought my iMac back from the brink and wanted to express my appreciation about what I've learned here.

In short, my 2011 27" iMac running 10.7 lost its recovery partition and whether its necessary for one to be in place to perform a clean install of Lion over the Internet I will leave for the gurus and experts to decide... all I know is that while I was smart enough to back-up my data ( and on two different drives ) for such a possibility as a total and complete crash of my newest Mac, repeated restores from my Time Machine back up drives brought it back... but only momentarily.

I've been a Mac user since the 1980s. My first Apple was a brand new Black & White Mac Classic. Always able to install an OS using discs which were bundled with my Macs ( that rarely misbehaved ) I was a little more than freaked out to learn that's all changed with newer Macs which is to say all I had to go on were my Time Machine drives, trusting that the OS would be put to rights via a complete restore, however not until I recreated a Lion recovery partition on the drive was I able to perform a clean OS install, again, over the Internet.

My iMac returned to life just yesterday morning after numerous failed attempts to bring it back and only after a clean install of 10.7 Lion. I don't know what the underlying cause of the crash was, I probably never will, but I do know I am grateful for forums like this ( where I've spent seemingly countless hours over the past week or so ) because without the information I've gleaned here my 3 year old iMac would most likely have become a lawn ornament. Chances are I would also be replacing some window glass after throwing my iMac through it out onto the lawn and while I may have felt better for a fleeting moment or two... my Mac wouldn't be fixed so tossing it wasn't an option.

After reviving my iMac with a fresh copy of OS 10.7 I then proceeded to restore its pre-crash data with Migration Assistant rather than Time Machine for I reckoned that data corruption on a system level would only be duplicated back onto the drive with a complete restore which would have been a borderline stupid move given that the machine was running smoothly. Now to figure out the best means of duplicating my restored drive so that if history should repeat itself I'll have a complete local copy and not have to spend hours ( if not days ) finding answers all over again. And again... many thanks

-2

Are you sure it's not there? The recovery partition doesn't show up in disk utility, to view it you have to reboot and press option (alt) to get a list or drives you can boot from and you should have one called Recovery HD or if you want to access it directly just press Command-R at startup.

2
  • 1
    I was fairly sure - but not certain when I asked the question. In hindsight, it certainly was not there - I used diskutil list before the reinstall and it wasn't on the partition map. I kept asking myself the same question, though - how can I know if it's there if I don't know what it looks like. Thanks!
    – bmike
    Jul 29, 2011 at 17:06
  • It wasn't there until I re-ran the installer.
    – bmike
    Aug 9, 2011 at 14:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .