LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-02-2012, 08:49 AM   #1
kiran.ursal
Member
 
Registered: Feb 2012
Posts: 36

Rep: Reputation: Disabled
Post centos 4 superblock recovery


Hi,

I have used installed a centos 4 distribution in my PC for a few months which was quite good. However, the system failed to start last week and shown the following message on startup:
//----------------------------------------------------------------------------------
booting 'CentOS (2.6.9-5.0.5.EL)'
root (hd0, 0)

filesystem type is ext2fs, patition type 0x83
kernel /vmlinuz=2.6.9-5.0.5.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
[Linux-bzImage, setup=0x1400, size=0x15cbd4]
initrd /initrd-2.6.9-5.0.5.EL. img
[Linux-initrd @ 0xfdfb000, 0xeee2bd bytes]

Uncompressing Linux.... ok, booting the kernel.
audit(1119364802.006:0): initialized
Red Hat nash version 4.1.18 starting
File descriptor 3 left open
reading all physical volumes. This may take a while....
/dev/hdc: open failed: No medium found
/dev/hdd: open failed: No medium found
Found volume group "VolGroup00" using metadata type lvm2
File descriptor 3 left open
2 logical volume(s) in volume group "VolGroup00" now active
File descriptor 3 left open
EXT3-fs: unable to read superblock
mount: error 22 mounting ext3
mount: error 2 mounting none
switchroot: mount failed: 22
umount /initrd/dev failed: 2
Kernel panic - not syncing: Attempted to kill init!
//----------------------------------------------------------------------------------

I have tried to

1) linux rescue
2) skip mounting and go to command prompt
3) enable lvm and tried fsck for the volumes (one is empty volume? and another failed)
4) run fdisk to list devices
5) fsck.ext3 the devices
6) run fsck again and specify the superblock number as suggested (from the prompt and "mke2fs -n /dev/hda2) but all failed for /dev/hda2

Fyi, I remember I have choosen to put everything (except /boot) under / during linux installation and the file system is ext3.

I guess /dev/hda1 is /boot and /dev/hda2 forms the volume group 'VolGroup00' with 'LogVol01' as used-block volume and 'LogVol00' as unused-block volume. It seems that the superblock got corrupted and the backup superblock number cannot be determined correctly. I am not sure whether I should deal with the logical volume or the device with fsck. Or I am heading towards a wrong direction. Please help. I really need the data.

The actual screen dump is as below.

Thanks,

VOA
---------------------------------------------------------------------------------------------------------------

#lvm lvscan
inactive '/dev/VolGroup00/LogVol00' [76.03GB] inherit
inactive '/dev/VolGroup00/LogVol01' [512.00 MB] inherit

#lvm vgchange -ay
2 logical volume(s) in volume group "VolGroup00" now active

#fsck -f /dev/VolGroup00/LogVol00
fsck 1.35 (28-Feb-2004)
WARNING: couldn't open /etc/fstab: No such file or directory
e2fsck 1.35 (28-Feb-2004)
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/VolGroup00/LogVol00
Could this be a zero-length partition?

#fsck -f /dev/VolGroup00/LogVol01
fsck 1.35 (28-Feb-2004)
WARNING: couldn't open /etc/fstab: No such file or directory
fsck: fsck.swap: not found
fsck: Error 2 while executing fsck.swap for /dev/VolGroup00/LogVol01

#fdisk -l
device boot start end blocks id system
/dev/hda1 * 1 13 104391 83 linux
/dev/hda2 14 10011 80308935 8e linux LVM

#fsck.ext3 /dev/hda1
e2fsck 1.35 (28-Feb-2004)
/boot: clean, 38/26104 files, 15417/104388 blocks

#fsck.ext3 /dev/hda2
e2fsck 1.35 (28-Feb-2004)
couldn't find ext2 superblock, trying backup blocks....
fsck.ext3: bad magic number in super-block while trying to open /dev/hda2

the superblock could not be read or does not describe a correct ext2 filesystem. if the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alterate superblock:
e2fsck -b 8193 <device>

#e2fsck -b 8193 /dev/hda2
e2fsck 1.35 (28-Feb-2004)
e2fsck: bad magic number in super-block while trying to open /dev/hda2

the superblock could not be read or does not describe a correct ext2 filesystem. if the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alterate superblock:
e2fsck -b 8193 <device>

#mke2fs -n /dev/hda2
mke2fs 1.35 (28-Feb-2004)
max_blocks 4294967295, rsv_groups = 0, rsv_gdb = 1024
Filesystem label =
OS type: linux
block size=4096 (log=2)
fragment size=4096 (log=2)
10043392 inodes, 20077234 blocks
1003861 blocks (5.00 %) reserved for the super user
first data block=0
maximum filesystem blocks=20971520
613 block groups
32768 blocks per group, 32768 fragments per grup
16384 inodes per group
superblock backs stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424

#e2fsck - b 32768 /dev/hda2
e2fsck 1.35 (28-Feb-2004)
e2fsck: bad magic number in super-block while trying to open /dev/hda2

the superblock could not be read or does not describe a correct ext2 filesystem. if the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alterate superblock:
e2fsck -b 8193 <device>

#e2fsck -b (98304, 163840 ....) /dev/hda2

(i tried 4 of them which were all failed, I wonder if the backup superblock (or block size) is applicable here or I should target at the logical volume instead of device using some other command to fix the superblock????
 
Old 03-02-2012, 02:26 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
How curious - how many systems w/ different distros but
similar issues do you have?



Cheers,
Tink
 
Old 03-02-2012, 07:31 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,089

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
also cent 4 is NOW past it's End Of Life
there is and there never will be any more support for Cent4

please install a current and supported OS like the current Cent OS 6.2
cent 4 came out 7 years ago
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in recovery of superblock of RHEL5. kiran.ursal Linux - Newbie 5 03-13-2012 06:03 AM
Emergency recovery kernel for CentOS 5 / boot image slinx Linux - General 1 11-11-2010 05:18 PM
Raid 5 - mdadm - superblock recovery - please help! pasha_suse Linux - Server 3 06-11-2010 01:42 PM
Centos - Recovery Commands andrew_ww Linux - Newbie 1 04-28-2009 04:51 PM
problem with superblock recovery, e2fsck. slayne678 Linux - Newbie 5 04-09-2007 05:53 PM


All times are GMT -5. The time now is 10:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration