Yesterday, the Paulsen household had one of those annoying, all-day, computer problems. On Wednesday, I'd upgraded the RAM in Carol's PowerBook from 768MB to 1.25GB in order to increase performance. The change was supposed to have no negative effects... unfortunately, a disk drive fault left Carol without a functional computer all day yesterday. The culprit: bad blocks.
For those people who like to think that they are safe if their hard drive's SMART status is still OK, I'd encourage you to still keep your backup regime. After increasing the RAM in Carol's machine yesterday, the expanded system file area (swap file for those of you with a UNIX technical bent) was either expanded or relocated to an area that included bad blocks.
Bad blocks are spots on a hard disk that cannot be written to or read from correctly. They are not uncommon in the manufacture of disk drives. As a matter of fact, they're expected, so IDE drives have the ability to work around them. However, they only do so during the formatting process. This means that if your disk drive develops bad blocks later in life (or if they were not detected during the original formatting process), you're likely to stumble upon them during normal operations, which will cause your computer to attempt to write information to those locations over and over again, commonly resulting in a clicking sound. Now, I'm not quite sure why the OS didn't detect the block problem and just write around it, but that wasn't happening and her beloved PowerBook came to a grinding halt (most literally in this case).
The solution is simple enough, if time consuming. First, using the TechTool Deluxe disk from AppleCare (you know you want it), I verified that the disk drive checked out OK and did a surface scan that proved that there were definitely 6 bad blocks on the 40GB hard drive (about an hour).
Next, I backed up her disk using SuperDuper! from Shirt Pocket Software (if you don't have a copy already, definitely get it for free, and consider purchasing it). This required a bit of work because the machine wasn't performing well, so I took an external firewire drive, installed MacOS X from DVD onto a Firewire drive and booted from it to make the copy (incidentally, but not as a requirement) to another partition on that same drive. The copy took about two hours and was definitely slowed down by the bad blocks.
Next, I erased the internal hard drive using the Erase with Security Option in Disk Utility set to Zero Out Data. By doing this, the hard drive should visit, and consequently map out, the bad blocks on the drive. After about an hour, this was done.
Now it was off to the installed version of TechTool Pro (I could have used TechTool Deluxe, but since I had a copy of Pro lying around, it meant I didn't have to boot off the CD) to re-run the surface scan: another 40 minutes and it was deemed clean.
Back to SuperDuper! for the final step: copying the data back onto the hard drive. This took about an hour (since the bad blocks had been wiped out) and Voilà! the hard disk was ready to boot up and resume normal operation.
Total time to fix: about 6 hours.
The moral of the story
However, the moral of the story has nothing to do with the steps above. It has entirely to do with the fact that because we had current backups of the entire system, we were able to get started on the above immediately and without fear, because we knew that we wouldn't be losing any data. back everything up!