Crash

It’s nearly four years old now, so I do expect the odd beach ball occasionally. When my MacBook is doing something hard or complex or just opening iTunes, it often shows its “I’m too busy to respond to you right now” indicator. But this time it was different. The beachball appeared and didn’t really go away again. Sure, it occasionally hid but as soon as I instructed the machine to do anything it would return.

And I do mean anything. From accessing a menu item, to quitting, to switching application, everything resulted in the beachball returning.

I powered off for the night, optimistically hoping that it was transitory, maybe a software failure that a simple reboot would fix.

The picture above and the title of this post probably tells you that it wasn’t.

Fortunately I was pretty well prepared and I lost little more than a few days use of my MacBook and less than £50. My backup regime has changed a little since I last wrote about it so it’s probably worth discussing what I’m doing these days.

Previously I used SuperDuper to clone my main disk. The nice thing about this is that there is a full, bootable copy of my complete Mac. The disadvantage is the small print surrounding the word “complete.”

It’s absolutely complete, but only to the point that the last backup was actually made. Using SuperDuper is fairly quick and easy, but it’s still a manual process that needs to be initiated manually.

Fortunately I realised this before I lost any data. A couple of years ago, shortly after I upgraded to Mac OS X 10.5, I also picked up a Time Capsule. Long story short, a Time Capsule is a wireless router with a built-in disk. And 10.5 has a feature called “Time Machine” that automatically performs hourly, incremental backups.

Since the disk in my MacBook went so suddenly this was brilliant. I would lose a maximum of one hours work with only one proviso: that the backup actually worked.

But skipping straight to actually restoring the backup would be missing a few steps. First I had to replace the broken disk.

CPUs and disks are things that I understand more in theory than in practice. I know that CPUs come in different clock speeds and with varying numbers of cores but if you start to discuss Intel part number I’m going to reply with a blank look of incomprehension. Similarly, I know that disks come in a number of physical and capacity sizes. So when I was looking at the specifications question such as “What’s the difference between SATA and SATA-II?” were asked. I quickly became confused.

Answers were not entirely forthcoming. In the end I took a bit of a punt and bought twice the capacity (320Gb) with a faster rotational speed (7200rpm). Most disks were SATA-II so I crossed my fingers on that. And nowhere did I see a physical size mentioned so there was no way that I could check to see whether it would actually fit in the aperture left by the old, failed disk.

As luck would have it, it all worked out just fine. Replacing the old disk was suspiciously easy, so much so that having switched over I was wondering which steps I had missed or which vital component had dropped on the floor and whose absence would short out the motherboard.

I booted up from the Snow Leopard install disk and told it to restore from the Time Capsule. On first attempt it couldn’t find a disk to install on to. I missed a step. I went back and formatted the new, 320Gb disk.

I let out a big sigh of relief when I realised it could find and format the disk. I guess that meant by confusion over SATA and SATA-II wasn’t going to be a problem.

This time the restore started. It would, the installer said, take about eight hours to complete.

I don’t know exactly how long it took but it was ready the next morning.

I rebooted.

It looked good.

My familiar desktop was there. The backdrop was there, the few documents and folders that I had there before the crash were still there now. The dock showed all my old applications. I poked around my Documents folder.

All good.

Phew.

I clicked on Mail. Slight panic when the setup dialog appeared, and then I realised that Time Machine would not have backed up in the mail index. The messages were all there. It churned away for a while, processing all the messages. It finished. And then it crashed.

I restarted.

It re-crashed.

Okay, let’s Google the error message.

Ah, Safari crashes when launching too.

Everything with an embedded web view crashed either on launch or when the web component was used. Even the Software Update app. Worrying, but not cause for concern yet. Using Firefox, which did still work, I downloaded the 10.6.4 updater from the Apple website and proceeded to install.

In doing so, I learned something new. Did you know that the installer application has an embedded web view?

Luckily the command-line does not scare me — I have a history of voluntarily using Emacs — and I found the appropriate incantation to install the patch the hard way.

It didn’t work. Applications crashed in exactly the same place as before.

In hindsight I probably should have tried installing Safari again but instead I went straight to reinstalling the whole OS from scratch. From past experience I knew that my data was safe. It may have been a brute-force approach, but I was confident that it would work.

And it did.

It took about an hour to do the initial install, then I had to download and install a bunch of updates. Excluding the time it took to copy my data from the Time Capsule to the local disk, it took perhaps three hours to swap out my old disk and get my laptop to pretty much exactly the state it was in when the old disk stopped working.

It’s disappointing that the restore from Time Machine backup option didn’t work in its entirety but, to its credit, I didn’t lose any documents, emails or data. And in that sense it was a complete success.