How do I get an operating system onto a new hard drive?

Being a 1 Mac household and an IT professional who has only supported PCs, I had a challenging time trying to figure out how to reload OSX after my husband's Mac hard drive died. Hopefully I diagnosed a bad hard drive correctly (I'll provide my method) and I hope this helps someone out there. This is probably overkill on instructions, but there are PC people out there who may try to help out the (much more) rare critical Mac issue. I did most of this from memory, so I may have messed up a label here or there. Please use Common sense if I did this and look around the screen for something that looks like what I'm talking about.

NOTE: This process only worked because the hard drive was still able to access recovery mode by holding Command+R on startup. If your Mac is unable to access that feature, this may not work for you, but I included some other handy stuff, like recovering files from the drive.

Initial Symptom: My husband's Mac had been randomly shutting down for some time, but we were limping it along. Finally, on startup one day, he saw a progress bar that would complete and then the device would shut down. Here is the process I followed:

Things you'll need:

  • SATA/IDE to USB Adapter (Mine was Vantec USB 2.0, but it shouldn't matter. Be sure to get one with external power source. I've had little to no success with USB powered devices.
  • Mac running OSX Lion or later (prior versions didn't have the recovery partition)
  • New Hard drive that is compatible with Mac.
  • T8 Mini Torx screw driver
  • Small phillips screwdriver
  • Recommend: A cold beer and a lot of patience
  • Just in case you pull off the rubber coating, you'll need a case removal tool like you use to replace a cell phone screen. http://www.amazon.com/dp/B004XVPDSG/ref=tsm_1_fb_lk

Step 1: Troubleshoot the Device

  1. Power off the Device
  2. Hold down the Command+R keys as you start the device. Continue holding the keys until the Recovery Utility prompts you to select a language (Grey Screen) **NOTE:**You may have to hold the keys for up to two minutes.
  3. After you've selected a language preference, Select the Disk Utility item in the list of utilities.
  4. Select your drive on the left navigation panel (It's probably already selected)
  5. Click the Verify Disk button in the Disk Utilities. It will probably show some erros. Click the Repair Disk button that will only appear after you click Verify. Do this until there are no errors or (like me) you receive a message saying that the disc couldn't be repaired.
  6. Click the Verify Disk Permissions button. If this completes successfully, click Repair Disk Permissions NOTE This may solve your problem. If you didn't receive a nasty message on step 5 saying the Disk was corrupt, to back up your files and such, good on ya! Try some Canadian troubleshooting -- When in doot (doubt) Reboot!

Step 2: Removing the Hard Drive from the Mac

Here's a great visual guide to the steps below: https://www.ifixit.com/Guide/MacBook+Pro+13-Inch+Unibody+Mid+2010+Hard+Drive+Replacement/4305

  1. Turn off the MacBook.
  2. Remove the hard drive from the device by removing the 8 screws from the bottom of the MacBook and pulling off the bottom cover, being careful not to pull at the edges as it will pull off the rubber coating. If you accidentally do this, tip to follow. To pull the cover, put your fingers at the hinge of the MacBook screen (from the bottom), and lift from the metal part under the rubber cover.
  3. You will see a small black bar held down with two screws right next to the hard drive. This must be removed before the hard drive is pulled out.
  4. If your hard drive is OEM, there should be a plastic tab that you gently pull on to lift the hard drive, being cautious of the SATA cable
  5. Pull gently at the cable connector seated in the end of the hard drive facing the exterior of the case to disconnect the hard drive.

If you messed up and pulled off the rubber coating:

  1. After you have finished removing the bottom cover, get out the case removal tool from the list of things you'll need that you diligently ordered with your new hard drive for just $1 or so
  2. Hold the rubber coating on the metal case with the metal part (inside of the cover) facing you.
  3. GENTLY slip the edge of the case removal tool under the edges of the rubber coating with the edge of the tool facing towards you and lift the edge back over the edge of the metal backing.
  4. Slowly glide the tool around the edge, lifting the rubber back into place, being extra cautious around the corners.
  5. Put the back plate down and don't breathe on it or the rubber stuff will come off again.

Step 3: Using a PC and HFS Explorer to Recover Files

  1. Download HFS Explorer and install it on your PC (http://www.catacombae.org/hfsexplorer/)
  2. Plug the removed hard drive into the SATA/IDE to USB device. There will be two cables to plug in and they are directional. The smaller plug is the data cable that goes into the rectangular USB connector. The other goes to the power cable. If you bought the same one I did, there is a connector that adapts the standard power supply connector to SATA. There is a power switch on this cable.
  3. Plug the USB cable into your PC and turn on the power switch on the cable (if you haven't already).
  4. You should hear the device chime in Windows, or you can verify that the device driver was recognized and installed in Device Manager. Note: You will not see it show up as a hard drive as the Mac drive format is not diurectly compatible as a disk drive with Windows.
  5. Open HFS Explorer and click File > Load File System From Device
  6. I was not able to use the AutoDetect Button successfully, but you can try. I selected the Select a Device radio button and in the Detected Devices drop-down and click Load
  7. Select the files and folders you wish to back up in the tree to the left just like you would any Explorer (or Finder for you Mac peeps) tree, then click Extract. My husband's files were in the second partition under the Users > [Username] folder.
  8. Follow the prompts to extract the files to the desired location. You will have to babysit it because there are a lot of Mac file names that are not OK on Windows. I used the "Auto-Rename" feature and it worked swimmingly.

Step 4: Installing OSX on the New Hard Drive

If you're still with me, crack open another beer, because you've probably finished the first one. This was the most frustrating part to research. When you Google, " How do I load OSX on a new hard drive using a PC ", you end up with some great suggestions to use VM Virtual Box, which means you have to get a copy of your OSX load. Well, mine happened to be on this one very broken Mac hard drive, and you can only make a Mac bootable with a Mac. Grr...So, I gave this a shot. I hope it works for you.

  1. Install the NEW hard drive back into Mac. Before you do this, there are a couple of screw-in pins that are in the sides of the old hard drive that you will need to hold your new hard drive in place. Use the T8 mini Torx screwdriver to remove them and place them into the sides of the new drive. These will hold your new drive in place. Put a couple of screws on opposite corners of the bottom plate to hold it in place and protect all the precious bits in there. Do not turn on the Mac yet
  2. Connect the OLD device to the SATA/IDE connector, connect the USB to the Mac and turn on the power to the new hard drive
  3. Hold down the Option key and turn on the device to choose which device to boot to.
  4. Select the OLD hard drive (Probably called Recovery_[something]) when prompted to choose a boot device.
  5. The boot sequence will take you into the Mac Recovery Utilities menu
  6. Select the Disk Utilities option from the menu
  7. Select the NEW Drive in the list to the left and click Verify Disk. This should come out clean
  8. Click the Erase option in the Disk Utility and complete a format of the hard drive using the Mac OS Extended (Journaled) option
  9. If you like, partition the drive using the Partition option and set the number and size of partitions to the desired size.
  10. Exit the Disk Utility tools using the menu in the upper-left
  11. In the recovery menu, click the Reinstall OSX option
  12. If you are prompted to connect to a wireless network, you can either connect it to an ethernet cable to speed things along, or click the Wireless icon in the upper-right of the top toolbar to search for an SSID to connect to. This will permit you to use the online recovery options to download the operating system.
  13. Follow the prompts and enter your iTunes login info
  14. When prompted to select a disk for installation, select the disk (or partition) you would like to install OSX on on the NEW hard drive and follow the prompts to initiate the installation.
  15. IMPORTANT When the reboot after download occurs, if the installation gets stuck on Verifying Disks or shows symptoms of pixelation on the progress bar and corresponding status text, hold down the power button on the Mac to shut it down. CONGRATULATIONS! You successfully diagnosed that the old hard drive is bad. ;-) If this occurs and your installation doesn't go through, pull the USB cable from the SATA/IDE to USB adapter from the USB port, hold down the Control key and turn the Mac on. Select the Install OS X drive as the boot device.
  16. Wait for an eternity...have a couple more beers...Voila.

The easiest way, with the least steps, and with no thumb drive nor cloning (nor etc., etc.): web install.

With your Mac near a trusted Wifi access point or plugged into ethernet...

  1. While booting up, hold down command + r until you see the image of a globe. You will see a message below: 'Starting internet recovery. This may take a while.'

  2. If on Wifi, select the network and enter a password. It may seem like your password was rejected for a second - wait a bit.

  3. Web install begins!!! You will see a status bar count down with the image of a Globe above.

  4. Select your language.

  5. OS X Utilities will appear.

  6. Select 'Disk Utility' - it will gather info on your system.

  7. Select your new hard drive from the sidebar.

  8. Select the 'Erase' tab.

  9. Select the format and give it a name.

  10. Click 'erase'

  11. The hard disk is reformatted - a new disk with the name you have it will appear in the sidebar.

  12. Close 'Disk Utility'; you'll be brought back to OS X Utilities automagically.

  13. Select 'Reinstall OS X'

  14. Select 'continue' and 'agree' to the various screen until you are prompted to select which disk you want to install OS X.

  15. Select your newly minted hard drive and hit 'install'

  16. The download of OS X will begin! You're home free!