recovering FC3 from a bad superblock
Greg Rundlett
greg.rundlett at gmail.com
Mon May 16 13:31:01 EDT 2005
My work system is a dual-boot laptop running FC3 and Windows (don't
actually use it). The battery ran out, and it seems like the cache
got dumped onto the superblock b/c the next time I booted, it refused
and said I should run e2fsck due to a bad inode on the superblock.
The system would only give me a grub prompt. Not sure what to do, I
took it in to our helpdesk and they obligingly ran e2fsck on it.
e2fsck ran for a long time, complaining about every inode on the disk,
and seemingly moved everything around. Still, the system refuses to
boot with a kernel panic: VFS: unable to mount root fs on unknown -
block (8,3).
I booted the system using Fedora Core 3 DVD, and put it into 'rescue'
mode with the command "linux rescue", and ran fdisk on the hard drive
to see what partitions were there:
fdisk
Device Boot Start End Blocks ID System
/dev/hda1 * 1 446 3,582,463+ b Win95 FAT32
/dev/hda2 447 4736 34459425 83 Linux
/dev/hda3 4737 4863 1020127 82 Linux swap
This seems to indicate that the Windows partition is the boot
partition. However, the system normally boots into Linux without any
interaction. I temporarily mounted the first and second partitions
read-only
mkdir test; mkdir test2; mount -r /dev/hda1 /test; mount -r /dev/hda2 /test2
And
ls -al test2
shows me that there is a complete linux filesystem there, including
the boot directory
I am kinda lost on what to do to try to repair the superblock. If I
try running e2fsck (read-only) on that partition, it doesn't complain.
So, forcing it
e2fsck -f -n /dev/hda2
tells me there are errors
Using the so-called backup superblocks [block-size (8192 *n) +1], it
reports a 'bad magic number'
e2fsck -b 16384 -n /dev/hda2
How should I go about fixing the 'errors' while the filesystem is not
mounted? Or, how should I mount the filesystem properly so that it
can be fixed, but not 'used' during the fix?
I am reading a grub howto now, but any help would be appreciated.
http://www.linuxquestions.org/questions/showthread.php?s=&postid=1413211
Thanks
More information about the gnhlug-discuss
mailing list