Posted by Isaac | Posted in Technology | Posted on 07-19-2008
Tags: disk failure, Geek, OS X
Warning: Geek Ahead
I recenty had a problem with my Apple HD and I didn’t find anything good online, so I am going to post what I did here so anyone else trolling the search engines might get some help.
Scenario:
I don’t reboot my laptop often, but I noticed that it’s running a little sluggish, so I decided maybe it’s time to give it a good restart. I am, of course, looking over some of my notes for the two presentations I am giving in a couple of days as it does this. As the computer starts back up, I turn away. When I look back, it is turned off. Odd, but my laptop has some quirks, so I give it a go again. This time I watch. Yup, it starts to boot and then just turns off. Weeeeeird.
I get my handy boot/install disk and check the system log, where I see messsages like this..
kernel[0]: HFS: Runtime corruption detected on HD, fsck will be forced on next mount.
kernel[0]: hfs_swap_BTNode: invalid forward link (0xb6baad6e >= 0x0000a280)
kernel[0]: node=33456 fileID=4 volume=HD device=/dev/disk0s2
Bad juju, but hopefully not a big deal. I pull up Disk Utility and I get this lovely message.
Invalid record count
Volume check failed
Error: The underlying task reported failure on exit
1 HFS volume checked
1 volume could not be validated or repaired because of an error.
Blah.
So I play the “I’ll look away and then it will do it” game for a while, but I can’t make it work. I go back to the command line and use the checking tool myself.
fsck_hfs -d /dev/disk0s2
Same result. Thanks. I, of course, run this a couple more times, ’cause, yeah, you never know. Hah.
I do some research online and find very little. I’m looking at some of the fancier tools and then realize I haven’t tried all of the options with fsck_hsf. I notice it always fails at the catalog check
fsck_hfs -dr /dev/disk0s2
Ahha! -r rebuilds the catalog. It runs through about four checks over about 10-15 minutes, but comes out saying it’s clean. I run one more check just to be safe, but it doesn’t detect any problems. Cross my fingers and reboot and, viola, it works.
This probably means my disk is toast or going to be toast soon, but I’ve been monitoring the log and so far no errors, so we’ll just have to see. I have my system backed up, so it wouldn’t/won’t be tragic to replace the drive, but it’s work I don’t really want to do if I don’t need to.
I hope this helps someone–fun with disk problems!

I’m having the same problem, thanks for giving everyone a chance to give a shot at fixing it. The -dr fix didn’t work on mine, however, so I’m thinking my problems may be a bit more advanced.
Same problem of “invalid record count” when I run Disk Utility of Apple.
Symptom is ( my guess) that when I do nomal work, I have exetremely ennoying unwanted pauses with the spinning colored wheel.
“Solution” is that I do a full restauration from external HD ( Time Machine) ; when I do this, the hard drive test then is OK again , but never last very long.
My question = what is causing those recurring corruptions of my hard drive ?
I am currently trying to recover data first, then I will try this. It seems like the files are still there, just certain folders are unreadable. I want to finish this data recovery first though before I change anything.
I will let you know if it is successful.
Shut off the hard drive, replugged it in and mounted it… it works… nothing else was done. Well except wasting 3 days worrying and data recovering
fsck_hsf -dr /dev/disk0s2 should be
fsck_hfs -dr /dev/disk0s2
and remember to run plain fsck afterwards until it stops complaining too!
Otherwise, thanks for this. I suspect it just saved me a re-install.
Avendit,
Thanks for catching that typo after all this time. Updated.
Glad my notes helped!