Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

superblock corrupt

2 views
Skip to first unread message

Paul Rowland

unread,
Apr 19, 1999, 3:00:00 AM4/19/99
to
I've read all the suggestions on superblock repair. But what does one do
when you can't even get the system to boot, using loadlin and the
kernel. I tried backup kernels, Slackware root/boot, RH boot(I run
RH5.2), no matter what I tried it always went into kernel panic when
trying to mount, and would not recognize /. Is this not hopeless? I
wound up initializing the system and of course lost all my data.


Jim Howes

unread,
Apr 21, 1999, 3:00:00 AM4/21/99
to comp.os.linux.misc
To repair a FS you don't have to mount it.

The system mounts the root fs readonly for checking because it
has to load e2fsck from somewhere.

If you've lost your primary superblock, you can do something like
this to find and use one of the other ones...


1. Boot a slackware boot/root, or some other sort of environment
which gives you a root fs other than your hard disk partition

2. Run e2fsck on the volume, specifying a backup superblock address.
If you created the filesystem with default values for inodes/group
etc, your backup superblock addresses will all be multiples of 8192
plus one, i.e. 8193, 16385, ... 49153 ... etc.

This is something like:
e2fsck -b 8193 /dev/hda1

You might want to add the -n argument to that the first time you run
it (i.e. e2fsck -b 8193 -n /dev/hda1) to see what the extent of the
damage is before you let e2fsck scribble all over it.

If you have a few important files you want to save, you should be
able to find and dump them with debugfs; and if e2fsck can't
unscramble your filesystem, you might want to consider the -S
option to mke2fs..

-S Write superblock and group descriptors only. This is useful
if all of the superblock and backup superblocks are cor-
rupted, and a last-ditch recovery method is desired. It
causes mke2fs to reinitialize the superblock and group
descriptors, while not touching the inode table and the
block and inode bitmaps. The e2fsck program should be run
immediately after this option is used, and there is no guar-
antee that any data will be salvageable.

lla...@my-dejanews.com

unread,
Apr 21, 1999, 3:00:00 AM4/21/99
to prow...@m3107tpr.atl.hp.com
In article <371B2AD0...@m3107tpr.atl.hp.com>,

Use a rescue system that runs in RAM (RAM-disk); you should be able to
repair a filesystem, i.e. run efsck on unmounted partition to repair.

--
Louis-ljl-{ Louis J. LaBash, Jr. }

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

0 new messages