Bad Superblock
My little mini-itx server does a sterling job as a home server. It makes available images, video and music all round my house via my wireless router/adsl modem. Just before I went on holiday I booted it and it would not start.
When we got back from our hols I investigated the problem further and after rummaging around found that the fstab file had become corrupted. I duly fixed this or thought I had because when I rebooted I got a bad superblock error.This was slightly annoying as most of the stuff on the machine was not backed up.
I am not by any means a Linux expert and this problem was pretty frustrating as each time I booted the server I would be chucked into ‘File System Repair’ mode which is useless really as you can’t edit anything as all the files are mounted as read-only but I could see all the files. This made me very reluctant to wipe the drive. The first thing I did was buy a new hard drive so that I could back up anything if I managed to access the files.
I scoured the internet to find a solution to this problem. Most people seemed to think that the easiest thing was to wipe the drive and start again.
I found a piece of software called TestDisk. I looked at the list of LiveCDs and thought one of these might answer my prayers. I downloaded Parted Magic. I booted into it and ran TestDisk followed this tutorial. TestDisk didn’t find any bad superblocks.
I was getting slightly desperate at this point so I did a bit more surfing. I think in my initial quest I had perhaps been looking for the wrong thing. The server is partitioned using LVM so I started looking for data recovery tools for LVM. In my searches I found a couple of article that mentioned LVM recovery. I thought I’ll have one more go then I’ll wipe it. I ran through LVM recovery section ignored the RAID bits as my computer is not RAIDED. Using an Ubuntu LiveCD rather than Knoppix I managed to access the data. I backed it up onto the new drive and then thought I might as well see if I can get this to boot again. I fixed the fstab rebooted into the original system and it all started up cleanly again. Obviously I was very pleased with myself.

Leave a Reply