View Full Version : Corrupted Super-block
michel1051
4th June 2006, 12:16 AM
I run FC5 that was installed from scratch - with the default partitions (LVM)
My computer lost power during a thunderstorm. After that, the startup sequence would hang around the 'reading the filesystem' stage.
I am using fsck and e2fsck with a backup super-block location (32768) to repair the file system. It worked on /dev/hda1 (the 'boot' partition). It does not work when I try with /dev/hda2 (the 'home' partition where all my stuff resides).
I get the following error message: "Bad magic number in super-block while trying to open /dev/hda2"
How do I proceed from here?
Skunk Worx
4th June 2006, 01:34 AM
You can get a list of the partition types using "fdisk -l <device>"
IF it's an e2/e3 fs partition use mke2fs -b and -n options to get the list of alternate superblocks.
http://linuxcommand.org/man_pages/e2fsck8.html
IF it's LVM, which I consider more likely, you'll have to mount the partition into a volgroup/logvol first, then use the commands above (or similar) to e2fsck the "logical drive" under /dev.
See the grub.conf kernel arguments for the LogGroup and LogVol settings. It's usually something like /dev/VolGroup00/LogVol00
ccrvic
4th June 2006, 10:25 AM
I get the following error message: "Bad magic number in super-block while trying to open /dev/hda2"
How do I proceed from here?
A couple of things to try before gettnig your hands *too* dirty...
pvscan
vgscan
lvscan
I've had these sort things out for me in the past...
Vic.
michel1051
6th June 2006, 01:30 AM
Thank you Skunk.
fdisk -l dev/hda shows hda1 as the boot partition of type = Linux and shows hda2 as type = Linux LVM.
mount mnt/hda2 brings message there is no etc/fstab file or directory
I cannot find clear-enough examples of the command mount. Can you help?
michel1051
6th June 2006, 01:32 AM
Thank you Vic.
The fedora core 5 rescue disk has none of the commands you suggested.
M
ccrvic
6th June 2006, 08:47 AM
The fedora core 5 rescue disk has none of the commands you suggested.
OK, boot Knoppix and get LVM running as per the instructions at http://www.knoppix.net/wiki/LVM2
This should help get you out of the brown stuff...
Vic.
rhb100
9th June 2006, 03:29 AM
You can get a list of the partition types using "fdisk -l <device>"
IF it's an e2/e3 fs partition use mke2fs -b and -n options to get the list of alternate superblocks.
http://linuxcommand.org/man_pages/e2fsck8.html
IF it's LVM, which I consider more likely, you'll have to mount the partition into a volgroup/logvol first, then use the commands above (or similar) to e2fsck the "logical drive" under /dev.
See the grub.conf kernel arguments for the LogGroup and LogVol settings. It's usually something like /dev/VolGroup00/LogVol00
How do You Mount the Partition as volgroup/logvol First?
Using fdisk -l, I get
Disk /dev/hda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 30401 244196001 7 HPFS/NTFS
Disk /dev/hdb: 61.4 GB, 61492838400 bytes
64 heads, 32 sectors/track, 58644 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 100 102384 83 Linux
/dev/hdb2 101 58644 59949056 8e Linux LVM
Disk /dev/sda: 9237 MB, 9237086208 bytes
255 heads, 63 sectors/track, 1123 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1123 8916075 8e Linux LVM
I am on /dev/hdb2, trying to mount /dev/sda2.
grub.conf says
kernel /vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb
Any help you could give would be appreciated.
ccrvic
9th June 2006, 07:26 AM
I am on /dev/hdb2, trying to mount /dev/sda2.
Don't. You've given control of /dev/sda2 over to the LVM system - trying to mount it as a conventional partition can only end in tears.
If you want to find any VGs on your system, use
vgscan
To make all VGs available to the kernel, use
vgchange -a y
To find the LVs that this provides, use
lvscan
Then mount what you want from those.
Vic.
rhb100
9th June 2006, 10:39 PM
Don't. You've given control of /dev/sda2 over to the LVM system - trying to mount it as a conventional partition can only end in tears.
If you want to find any VGs on your system, use
vgscan
To make all VGs available to the kernel, use
vgchange -a y
To find the LVs that this provides, use
lvscan
Then mount what you want from those.
Vic.
Thank you Vic for the information which helps to educate me on LVM2. The Fedora Core 5 gnome desktop tool, Logical Volume Management, under System > Administration tells me that /dev/sda2 is an uninitialized entry and that if I initialize it, I will lose all data on it. I can probably get along without the data on this 9 GB drive, /dev/sda2, since I created a dump level 0 before creating a new FC5 Linux on a 60 GB hard drive. I have already used restore to get most of the data I need and can use it again if needed.
I would however like to learn more about Logical Volume Management. What is the best reference for Logical Volume Management on Fedora Core 5?
ccrvic
10th June 2006, 12:02 AM
I would however like to learn more about Logical Volume Management. What is the best reference for Logical Volume Management on Fedora Core 5?
The man page is superb. I learnt most of what I know from it.
There's a (Debian-biased) primer at http://hantslug.org.uk/cgi-bin/wiki.pl?LogicalVolumeManagement that might help you.
Then there's the LVM HOWTO at http://www.tldp.org/HOWTO/LVM-HOWTO/ .
One of those should get you going...
Vic.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.