How to create a data recovery external drive

I knew something was wrong when I booted my 2012 MacBook Pro, walked away to get coffee and returned to find the computer had turned off. When I booted again, the grey screen appeared and the MacBook Pro booted part way before powering down. An attempt to boot into Safe Mode revealed that the CPU was halting, killing the processes, then shutting down.

Next came booting into Recovery Mode and attempting to fix the disk. After several minutes, the kiss of death was issued: the drive was corrupted, and I needed to erase and reinstall OS X. No big deal. I went to the bookcase for the external drive where I kept my Time Machine back-up. It was a bit out-of-date because of a few weeks of traveling, I thought as I plugged it in, but I would have no issue restoring from it. Right?

The dead external drive said otherwise.

Well, fudge. The 18-month-old hard drive in the MacBook Pro was corrupt, and my external disk that was barely two years old was toast. Now I needed to get everything off the corrupted MBP.

Conventional wisdom gives you several options. One is purchasing Disk Warrior and attempting to repair the disk. Another is producing an image of the hard drive via Disk Utility. A third is accessing the MacBook Pro from another Mac in target disk mode. Since there were no local stores that sold Disk Warrior, and I needed to replace my external drive anyhow, I headed to Best Buy and got one and a Thunderbolt cable.

The ailing drive would not mount in target disk mode on my MacBook Air because of the corruption, and attempts to create a disk image on the new external drive failed. Realizing that my options were dwindling, I stumbled across this how-to on Apple's discussion forums on creating a data recovery drive.

The basic idea behind the data recovery drive is that your primary computer uses it as a boot drive instead of the malfunctioning drive. In this case, you're advised to use a blank, powered external drive, which I just happened to have. The original steps were authored by Apple community member ds store, to whom I owe my undying thanks and full credit for this guide.

  1. Format the external drive with a single-layout partition that has a GUID partition table and is formatted to OS X Extended Journaled. You can do this either using the Disk Utility in Recovery Mode on the ailing Mac or through Disk Utility on another Mac. Hook the external drive up to the ailing Mac if you reformatted on another computer.

  2. Install OS X either through Internet Recovery (for OS X 10.7 or later), a USB recovery disk or the original install discs if you have OS X 10.6 or earlier.

  3. If your internal drive refuses to mount, when your computer reboots, it will automatically switch to the external drive to complete the OS X installation. If it doesn't, reboot again and hold down the option key and select the external drive.

  4. Complete the OS X welcome on the external drive. Put in the same user name on the data recovery disk that is on the internal disk.

  5. If all goes well, once you get to your desktop, you'll get a message saying that you'll need to erase and reinstall OS X on the internal drive. However, you can now see your internal drive again. Hurray! You can't write to it, but you can move/copy the files, so do this right away. Drag-and-drop the files from the internal drive over to their corresponding folders on the new OS X installation. ds store suggests leaving your old Users/Library files alone and focus on saving your applications, music, movies, documents and pictures. You might need to change permissions on these files in order to view them.

Once you're finished, you can erase and reinstall OS X on the internal drive and migrate everything back from the data recovery drive.