Thank god for backup superblocks

Last night I had a bit of a scare; I was googling around and got an error message in Konqueror that was very odd - something about a "read-only filesystem".

`dmesg` confirmed my fears; lots of ext3 errors and DMA errors. Well - nothing left to do here but reboot. Only my computer doesn't find my hard drive when I reboot. Oh - that's not good.

Powered the laptop off for awhile and back on and I can get into Grub now; okay, let's go to single user mode and see how bad the damage is... oh. No root partition found. That's not good either.

Okaaaay, rescue cd! I can fsck from there! Nope - it's not a valid ext2/3 partition.

At this point I was pretty much resigned to reformatting and reinstalling. Not a great thought, but I knew it was the end of the world. I rebooted into windows and got on the torrent for FC7-test4 and pulled last night's backups to the drive and went to bed.

This morning I get up and burn the FC7-test4 DVD. My one last thought was that I could run fsck with using a backup superblock, but my problem was I didn't know them down (I'm sure you write them down somewhere offsite, don't you?). Luckily a trip to e2fsck's man page was enlightening:

-b superblock              Instead of using the normal superblock,  use  an  alternative              superblock  specified by superblock.  This option is normally              used when the primary superblock  has  been  corrupted.   The              location  of  the  backup  superblock  is  dependent  on  the              filesystem's blocksize.  For filesystems with 1k  blocksizes,              a  backup superblock can be found at block 8193; for filesys-              tems with 2k blocksizes, at block 16384; and  for  4k  block-              sizes, at block 32768.

So I tried 8193, then 16384, then 32768, and vóila! fsck is much happier - well, I had lost the journal (in the primary superblock which was destroyed) and a bunch of stuff needed repaired, but it boots now!

So far things seem okay, but I don't know what caused the DMA problems originally. A smart long test didn't show up any errors and downloading a couple gigs of torrents last night didn't lock up the laptop, either. My only suspicion right now is the new Fedora Core 6 kernel update (kernel-2.6.20-1.2948.fc6).