Hard Drive Swap

My main computer is a MacBook Pro (17″ late 2011 model 8,3). I know where the internal hard drive is located, and I’ve heard some sounds from it like a marble dropping.

That can’t be good.

So I set about the task of a replacement hard drive. Yes, I still have AppleCare and could get it replaced under warranty, but that generally means I have to wait until it actually fails and then I’m probably out my computer for a week, which I just won’t do. And that’s just to replace the drive, not even to restore my data. I’ve done this sort of thing before, and it’s not difficult, just time consuming.

But this is a little different and I wasn’t sure how to proceed.

  • I maintain a regular backup using Time Machine to an external hard drive connected via FireWire. How could I leverage that? Sure I’ve used TM to restore individual files, and the rumor is you can use it to do a full restore of your entire system to get you going again. Never done it, just how well will it work?
  • I do have my 1 internal drive partitioned into 3 partitions. Two are backed up to TM. Will they restore?
  • What about the hidden Recovery partition? How to manage that on this new drive?
  • And will in fact life be normal again and like nothing happened, after the install?

Yeah, nerves. 🙂

At least I opted to use a 3-day weekend, just in case I needed that downtime.

Here’s how it went.

I bought a “DIY upgrade Kit” from Other World Computing. It had a 1.0TB HGST 7200 RPM platter drive along with an external enclosure. I debated getting a SSD, but I’m still a little wary of the technology. OWC does sell this “Disk Doubler” solution, which I gave serious thought to because I do not use the optical drive and having an SSD for a secondary would be interesting; the thought was put all my dev work on it because compiling is so file-intensive, but then Xcode generates so many caches on the boot volume I’m not sure what gain I’d actually see. *shrug* I passed due to uncertainty and cost.

Also, the external enclosure was a good choice. I hum-hawed on it because in the past I’ve used one but after the transfer I never use it again. But still, I’m glad I had it.

The trouble was trying to find some solid answers to questions. OWC actually has a very good guide on how to do this. However, they didn’t answer some fundamental questions, like if I had to reinstall the OS. The reason was my Recovery HD was setup for Lion (Mac OS X 10.7) but I’m using Mountain Lion (10.8) and of course needed that without going through the massive hassle. Furthermore, any sort of “migratory” approach would likely cause half-installed software and other things that may or may not work, and I just don’t need that hassle of trying to get going again.

Let me cut to the end result and let you know how things went.

  1. Install new hard drive in the MacBook. Put old hard drive into the enclosure.
  2. Ensure external FireWire Time Machine drive is hooked up, then restart the MacBook Pro holding down the ‘option’ key. That allowed me to choose precisely what volume to boot from. I am fortunate the TM backup does have a Recovery HD partition on it, and before you try this route you should ensure yours has one (simple enough: hook up the machine, boot with the ‘option’ key down and see).
  3. When started from the TM’s Recovery, use Disk Utility to erase, partition, and format the new internal hard drive. I formatted as HFS+ journaled. While I will want encryption, I didn’t do that at this point.
  4. While still in TM’s Recovery, reinstall the OS. Yes, this will put Lion on the machine, but we won’t care nor use it. The main reason we need to do the OS reinstall is because this is how we get the Recovery HD installed on the internal drive. This is a must, because 1. you’ll eventually need Recovery, 2. you can’t have encrypted (FileVault) partitions without it it seems.
  5. After the OS finishes installing, it’s OK to go ahead and finish out the install process and get logged into the default account. Again, don’t bother setting up much or configuring. Certainly do NOT have the install process migrate or copy any data. You are going to throw all of this out, so just let it go.
  6. When the install is done and you’re logged in, restart the machine. Hold down the ‘option’ key and again, boot from the external TM Recovery drive.
  7. Once you’re back in Recovery, Restore from Time Machine backup. This process will erase the internal drive, copying the backup. See? We’re going to lose that Lion install. 🙂  I was only given the option to pick my boot volume’s TM backup, but that’s the most important right now.
  8. Let things churn for numerous hours.
  9. When completed, you should be able to boot via your internal hard drive and proceed.
  10. When you are logged back in, things should generally look normal. But…
    1. Be sure to quickly ensure that Time Machine backups do not start and get disabled. Just in case. Make turning TM off a priority after you first log in.
    2. Some things are probably going to be broken, like my MS Office install needed to be reactivated. No big deal, but I would say at this point to NOT try recovering everything — be mindful of disk drive access. Just note what needs fixing and come back to it later.
    3. See, Spotlight is going to want to rebuild index, and that’s going to take a long time and cause a lot of disk drive read/write head movement. We’re about to do some other things too, and well, just too many things trying to hit the disk at once causing the drive head to skip all over the place? That’s just going to be slow.
  11. Before going much further with any configuration, I found it useful to shut the machine down, unplug anything plugged into it (like my TM drive), then restart with the ‘option’ key down, just to ensure I did have a recovery partition on the new hard drive. Then boot (again) normally.
  12. Turn on FileVault encryption. I use FileVault (you don’t have to). I enable it via the System Preferences for my boot volume, which then causes the machine to have to reboot. No problem, but again another reason why not to start doing too much at this point. FileVault is going to take hours to get things encrypted, so might as well get started.
    1. In Mt. Lion you can encrypt other drives/partitions by right-clicking on the drive/partition’s icon in the Finder and an ‘Encrypt…” menu item comes up. That’s so much nicer than the prior process. Thing is again, with multiple partitions this is going to cause drive head jumping, so you might want to just note to do this sequentially later. This is especially important due to the next step.
  13. Plug in the old hard drive (in the DIY enclosure). Unmount any unnecessary partitions because Spotlight will probably want to start (re)indexing them, so avoid the churn. In my case, I needed to restore my secondary partition’s drive. I used Disk Utility’s “Restore” functionality to do a block copy of the old partition to the new partition. I had actually started Encrypting the new partition before I did this, and it caused some problems because the Restore does some low-level stuff and the 2 things got in the way of each other. No real harm, just took time. Would have been better for me to first restore, then encrypt.
  14. After that, most things were working again. I let the FileVault stuff churn. I let Spotlight churn to reindex. Yes, the machine ran a little slower because everything was churning away. I ran apps, ensured the usual cast of apps I use in a day were working and behaving right. I did find a few things here and there that didn’t get (re)installed right (like my iPhone Simulator apps), so I copied them off the old drive (see? the DIY kit was useful, if only for this process).

And slowly, things seem to be coming back to normal.

The DIY kit turned out to be useful for simple copies of things that didn’t come back, the fact I seemed to need to use it in order to do a full restore of my non-boot partition. And a couple times I actually booted off that drive because I needed some “runtime” settings and config that I didn’t remember what I did, so I’d boot back into my old setup, see how things were, then boot back to the new setup to reconfigure things.

I also learned that yes, you do have to reinstall the OS. I grant for some people it might work to reinstall the OS then do something like “migration” to get you there. It might clean a lot of cruft out. But for me? That would be too problematic and time consuming. Plus I really wasn’t sure how the fact it would have started me in Lion then I needed to get to Mountain Lion… how that would have went. I would love if there was a way to ensure your Recovery HD was in sync with your major OS upgrade. I mean, when I finally go to Mavericks (10.9), recovery and reinstall could be a bitch to jump that much.

Note that when I didn’t have the Recovery HD, my machine is a recent enough model that can do “Internet boot”. There’s some peace in knowing that’s there, but what if I don’t have fast Internet access? And the fact you must have the local Recovery HD in order to use FileVault. I wasted a lot of time having to do things over again. Again, the main question that was never answered for me was how to handle the OS version differences. I figure if I migrated, it would have been a problem. But because all I used the OS reinstall for was to get the Recovery HD and other “internals” set up on the new drive, then blew away the actual OS install by doing a full restore from my Time Machine back up… well, there we go. Life goes on.

Anyways, I think I’m going again. So far, so good. The machine feels a little more responsive too. Looking at the specs of the old (looks to be a Travelstar 7K750) vs. new drive (Travelstar 7K1000): old had 16 MB cache, new has 32 MB; old uses SATA 3Gb/s, new uses SATA 6GB/s; new seems to have just a hair faster seek and r/w times too; new tho seems to consume a hair more power tho. We’ll see how it works out. 🙂

7 thoughts on “Hard Drive Swap

  1. You’re in for a treat when you try out an SSD. They’re noticeably faster than hard drives. Although, I will say that I sometimes miss having a giant HD, which is currently cost prohibitive for me with an SSD.

    • Oh I know the speed boost is huge. Disk i/o is a killer bottleneck.

      But that’s the thing: cost vs. capacity. I need lots of capacity given my dev work. So, this is just how it goes for now. Eventually SSD… because if nothing else, it seems that’s the way Apple’s going with their machines, so I’m sure I’ll be forced sooner or later. 🙂

  2. I did that about 6 months ago on my macbook pro 15″ late 2011. I bit the bullet and went with a Samsung SSD. Still works great and blazingly fast boots. Never have to defray it.
    I too had concerns but seeing as Apple is selling their latest laptops with SSD drives, I decided to take the chance…

    • I found the latest article that gave me pause:

      http://www.extremetech.com/computing/173887-ssd-stress-testing-finds-intel-might-be-the-only-reliable-drive-manufacturer

      Now granted, I’m on a laptop, with a battery, and I rarely notice power failures and other brown- or black-outs. But still, that article gave me some pause.

      I think what would be key to know tho was, how do traditional platter drives cope in the face of the above? What error rates do we see, etc.? A true apples-to-apples compare, and thus, is this really that huge a problem? Tho in an of itself, it still seems to be a problem.

      • the macbook does a graceful shutdown when the battery power reaches around 2% power level so this wouldn’t ever be an issue in this application. An iMac or mac pro not connected to a UPS, then there may be an issue…

  3. Pingback: The hard drive saga gets worse…. | Stuff From Hsoi

Comments are closed.