?
Solved

Corrupt Superblock

Posted on 1997-09-25
5
Medium Priority
?
662 Views
Last Modified: 2008-03-06
I run RedHat Linux 4.1 on a 486 machine with all the usual stuff.  This morning, I had a kernel panic due to a disk error on my boot partition, and now I can't reboot.

I booted from my "rescue" disk, and was able to mount the suspect partition.  When I try to run fsck on it, it tells me that I have a corrupt superblock, and that I should use fsck -b <alternate superblock number> /dev/hda4, and suggested that I try block 8193, a common location for alternate supeblocks.  Unfortunately, that didn't work.

So here is the question:  Is there some way to find out where my alternate superblocks are located?  If not, is there some other strategy to rescue this disk?

Thanks

Justin Harlow
0
Comment
Question by:harlow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
jlms earned 100 total points
ID: 1633563
Assuming you have a ext2fs filesystem , then try mke2fs -S (see man page first), and the the fsck command.


0
 

Author Comment

by:harlow
ID: 1633564
I looked at the man page for mke2fs -S, and it makes the operation sound pretty scary.  Is that mostly lawyerspeak, or is it probable that I am going to totally hose my files system by trying this?  I realize that nothing is certain in messing with filesystems, especially corrupt ones, but what's your guess as to the odds of success here?

I am curious about the algorithm used to decide where to hide backup superblocks (right... I didn't copy them down when I built the filesystem long ago...)  Where is this documented for e2fs?  I'd like to try to figure out where my duplicates are, and use e2fsck -b before I risk blowing the whole thing away.

Thanks

JEH

0
 
LVL 4

Expert Comment

by:jlms
ID: 1633565
Well, my Linux says it just show things without actually afecting anything, I will check later because my Linux box is not here now.  My guess is than most of the times one gets this problems the posibilities of loss are unfortunately high :(


0
 
LVL 4

Expert Comment

by:jlms
ID: 1633566
Sorry, you have reason to be scared, this command actually rewrites things (without modyfing inodes), and as the man page says, is practically the last resource.
In Linux I have not done something of this sort; with other UNIXes it works and most times allows you to make some recovery work. Dont forget to make a filesystem check after this.

0
 

Author Comment

by:harlow
ID: 1633567
Thanks.  I have sort of readched the same conclusion, namely, that my partition is hosed beyond salvage.  I was not even able to run mke2fs -S, which is supposed to rewrite the superblock and leave the inodes alone.  It aborts, saying that there is no file or directory called "stat".  The documentation is silent on what that file might be, or where it is supposed to be.  Even if this were to work, I think I am still stuck, because a lot of the kernel panics I get involve the inability to read certain specific inodes.  That is probably not totally a superblock problem.

As it stands, I have been able to mount the bad partition, and have successfully copied off almost all of its contents to another disk.  Unfortunately, the parts I cannot copy are /etc and parts of /var, so a full restoration is probably not likely even after reformatting the partition.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question