After installing new HDD into iMac, recovery partition is lost. In order to re-partition without a bootable disc, but instead using another iMac (with the first being in target mode) here’s what to do.

Mac1 – has no recovery and new hdd
Mac2 – regular system

Connect Mac1 to Mac2

  • Boot Mac1 into target mode w/ “T”
  • Once in Target mode, connect by FireWire or Thunderbolt to Mac2


Enable Disk Utilities to See Recovery

  • On Mac2, open Applications/Utilities/Terminal
  • Enter the following command
    • defaults write DUDebugMenuEnabled 1
      • “0” instead of “1” will disable/hide Debug menu option
  • Exit terminal
  • Open Applications/Utilities/DiskUtilities
    • DEBUG show be in menu bar, next to help
    • Select Debug -> Show All Partitions


Create Mac1 New Partitions

  • In DiskUtilities you should see your externally connected iMac (the one with the new HDD)
  • Click on its HDD (not a partition, but the drive label itself)
  • Click on the Restore tab on the right side of the screen
  • From the drop down, select 2 Partition
  • Drive image will become split into 2 parts
    • Top partition = recovery
    • Bottom partition = normal use
  • Grab slider between partitions and move up so that recovery is as small as DiskUtilities will allow
    • Recovery partition doesn’t need to be large (600-900meg is good)
  • Give the names something meaningful
    • Top name = Recovery HD
    • Bottom Name = Macintosh HD
    • (these are the default names by Apple)
  • Set Format to “Mac OS Extended (Journaled)”
  • Click Apply


Send Recovery to New Recovery Partition (and make backup *optional*)

  • Click on recovery partition on Mac2’s HDD (this is the one we are using as a source, to restore FROM)
  • Click RESTORE on the right
  • “Restore HD” (or whatever your recovery name is) should appear (in light grey text) in the box labeled as SOURCE
    • If not, drag it to the source box
  • Destination box: drag your newly created Recovery HD partition on Mac1’s HDD to this area
  • Click Apply
  • WARNING BOX will ask you if you’re sure, will also ask if you want to replace contents OF iMac1’s Recovery WITH iMac2’s Recovery, will also warn you that this will destroy/erase everything on that partition
  • Continue on
  • ALERT BOX will tell you it needs to scan recovery first, allow; this may take a good chunk of time
  • Repeat process after scan has finished (you cannot install a recovery or image until scan has verified the source)
  • If you get error saying “…in use…” make sure you have the source recovery partition selected
    • Recovery or image install will NOT work if you have the TARGET Selected when you do a restore
    • Even if you correctly set the Source and Destination, it will not work
  • After DiskUtilities has scanned the recovery partition, and you re-do the process again, recovery will dump itself to the new HDD and become a new recovery partition on your just installed HDD
  • OPTIONAL: select the recovery partition in iMac2, File->New->Disk Image from Recovery HD
    • This creates a DMG backup image of your recovery partition in case you need it later


Hide Recovery Partition from Finder

In OSX if you see your Recovery HD partition showing up that’s because OSX only hides APPLE_BOOT listed devices by default. It should really be hidden so that we don’t accidentally delete it or change anything to it.

First, we need to find out what the real name and location of the partition is, which may be different than what DiskUtilities shows us. To do that, open Applications/Utilities/Terminal and enter the following command:

mount | grep “Recovery HD”

This will give you something that looks like this:

/dev/disk0s2 on Volumes/Reovery HD (hfs, local, journaled)

The bold, color part is what we need to know. From here, it shows that my recovery partition is named “Recovery HD” and it is on /dev/disk0s2. Your’s may or may not be different, but use the colors above to match.

In Terminal, run the following two commands, replacing the color spots with whatever your query returned (from above):

/usr/sbin/diskutil unmount /dev/disk0s2
/usr/sbin/asr adjust –target /dev/disk0s2 -settype Apple_Boot

The first command unmounts the Recovery HD from finder so that we can work with it without causing any corruption. The second command will adjust the partition type to be Apple_Boot, which is the default type for an OSX recovery partition, which again, by default, is hidden from the system (Finder).

If for some reason you get an error message that says “Access Denied”, try running the command with “sudo” in front of it, like so:

sudo /usr/sbin/asr adjust –target /dev/disk0s2 -settype Apple_Boot

You will probably be prompted to input your administrative password at this point.

As the process completes, you’ll see a progress bar that goes pretty quick, and then complete status. Close out Terminal and restart your iMac. When it boots up, you should no longer see Recovery HD in Finder. If you open DiskUtilities,  you should see Recovery HD faded (assuming you still have Debug->Show All Partitions selected.


Booting to Recovery

NOTE: Using this method will bypass the “Command+R” bootup function. In order to boot to recovery, you need to use an alternate bootup method. See below.


Alt Boot

If you hold down “Option+R” you boot to recovery, or you can hold “alt” and boot to “boot location” which will let you select which disk/volume you want to boot from (disc, usb, recovery, hdd, etc.)

Print Friendly