Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Misc > cannot boot-up linux, unable to read superblock
 Misc   Any questions or Linux discussion that does not fit in any of the other technical areas.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 06-22-2005   #1 (permalink)
voa
Just Joined!
 
Join Date: Jun 2005
Posts: 2
cannot boot-up linux, unable to read superblock

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?????)
voa is offline  

Old 06-22-2005   #2 (permalink)
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,697
Quote:
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
How are you determining the appropriate backup superblock? Did you make notes of it when you created the filesystem?

There is a howto here on finding a backup superblock: http://forums.suselinuxsupport.de/in...howtopic=14152

Note that this was written for SuSE, but the ext2/3 utilities should work the same in your case (I think).

One thing I would add to the howto is that you may also be able to use
Code:
mke2fs -n /dev/hda2
on the unmounted device to find the backup superblock. That would probably be easier in your case.
anomie is offline  
Old 06-23-2005   #3 (permalink)
voa
Just Joined!
 
Join Date: Jun 2005
Posts: 2
Hi anomie,

I used "mke2fs -n /dev/hda2" to determine the backup superblocks and I have tried all of them with no avail.

I have tried e2fsck for the LV but shown the following messages.

Also, I have also tried to mount the data regardless of error, but failed.

I just wonder what I can do to recover the data?

Thanks,

VOA

--------------------------------------------------------------
#e2fsck /dev/VolGroup00/LogVol00
e2fsck 1.35 (28-Feb-2004)
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/VolGroup00/LogVol00
Could this be a zero-length partition?


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

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>

#lvm pvscan
PV /dev/hda2 VG VolGroup00 lvm2 [76.56 GB / 32.00 MB free]
Total: 1 [76.56 GB] / in use: 1 [76.56 GB] / in no VG: 0 [0 ]

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

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

#mount -o errors=continue /dev/hda2 /sysimage
mount: Mounting /dev/hda2 on /sysimage failed: device or resource busy

#mount -o errors=remount-ro /dev/hda2 /sysimage
mount: Mounting /dev/hda2 on /sysimage failed: device or resource busy

#mount -o errors=continue /dev/VolGroup00/LogVol00 /sysimage
mount: mounting /dev/VolGroup00/LogVol00 on /sysimage failed: invalid arguement

#mount -o errors=continue /dev/VolGroup00/LogVol01 /sysimage
mount: mounting /dev/VolGroup00/LogVol01 on /sysimage failed: invalid arguement

#mount /dev/VolGroup00/LogVol01
mount: cannot read /etc/fstab: no such file or directory
voa is offline  
Old 06-29-2005   #4 (permalink)
Just Joined!
 
Join Date: May 2005
Posts: 42
The very first piece of info read from a disk is it's Superblock ... which includes the disk's geometry information, available free space, and most important is the location of the first i-node.

Since ext2 and ext3 file systems place numerous copy's of the Superblock throughout the disk -one Superblock after every Group block- a group block is equal to 8192 blocks ... thus, the first redundant Superblock would be at 8193, second at 16385 - etc ...
Quote:
couldn't find ext2 superblock, trying backup blocks
Try this parameter with the mount -o command on an Ext2 filesystem "sb=n" (without quotes) this tells mount to use block n as the Superblock.

Example: mount -o sb=n /dev/hda1 /usr
Salient is offline  
Old 07-01-2005   #5 (permalink)
Just Joined!
 
Join Date: Dec 2004
Posts: 51
well, worst come to worst, plug your hard drive into another computer, grab your files you want saved, and wipe your drive. always have a backup plan
Indigno is offline  
Old 07-01-2005   #6 (permalink)
Linux Guru
 
loft306's Avatar
 
Join Date: Oct 2003
Location: The DairyLand
Posts: 1,666
voa: what did you do just b4 you rebooted? did you change anything? like a kernel or /etc/fstab ?
__________________
~Mike ~~~ Forum Rules
Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. ~ Linus Torvalds
http://loft306.org
loft306 is offline  
Old 07-07-2005   #7 (permalink)
Just Joined!
 
Join Date: Jul 2005
Posts: 3
Possible solution

I had the same problem and tried everything from this topic. In my case I have successfully run "e2fsck -b=32768 /dev/..." and the same with "-y", "-p", "-c", "-cc" options. At the end it always outputed the correct information on numbers of files and folders, usage statistics and so on. However it did not help me - the error continued. So I was almost to reformat the drive (I could not make dd since it was 300Gb disk and I had none of the same size).

BUT! Before that I connected the harddisk to a PC with winXP installed. And tried to check it with the "Ext2+Reiser" plugin of Total Commander. Can you belive that, it worked! As if there were no problems at all. I have rescued ALL the data on that broken disk!

Tell you what? I am a fan of Linux for longer than 3 years, but time to time smth. happens what makes me keep win as the secondary OS...((( What a pity!!!

Hope this can help someone.
antonmx is offline  
Old 11-17-2006   #8 (permalink)
Just Joined!
 
Join Date: Oct 2006
Posts: 23
Just in case anyone else finds this thread with RAID/LVM superblock issues... I found this article particularly useful: http://www.linuxjournal.com/article/8874
damber is offline  
Old 06-09-2008   #9 (permalink)
Just Joined!
 
Join Date: Jun 2008
Posts: 1
I came to this thread via Google. Yep, I had all the same problems and tried everything to get my LVM to mount after it stopped booting due to a "Machine Check Exception". The only thing that worked after all those hours was explore2fs on Windows XP, which worked like a charm - I recovered the data I needed. Quite surprising than Windows came to the rescue.

chrysocome.net
coljac is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Free Network Mapping Tool for Microsoft® Office Visio® Professional 2007 Users
Don't map your network by hand – let LANsurveyor Express for Microsoft Visio Professional 2007 automatically create network diagrams for you.
subscribe
Free eBook:"Vulnerability Management for Dummies"
Get all the Facts and See How to Implement a Successful Vulnerability Management Program.
subscribe
Google vs The World: The Battle of the Message Security Vendors
With such a powerful name behind it, Google Message Security stands out in a sea of products that do exactly the same thing - or so they say.
subscribe

Safe, Secure Backup


All times are GMT. The time now is 10:49 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2