Hi,
My first suspect is corrupted partition table. This make the disk driver
to "think" that the partition starts in a wrong position (happend to me
once many years ago when I had a dual-boot machine and some crappy
DOS utility messed the partition table).
The way to diagnose this is to search for superblock signatures:
1. Find the correct magic number. in /usr/...../linux/ext2_fs.h there
is a line:
#define EXT2_SUPER_MAGIC 0xEF53
2. Write (on a different machine of course) a small program that:
- Open the device file representing the whole disk (/dev/hda)
- Search occurances of this number.
- Print the containing block number (There are many)
3. Ignore the false alarms and choose the numbers that are spread
equally (8K or 16K or 32K apart -- read fsck.ext2(8)).
4. Now use (-n just checks, no fixes yet):
fsck -n -b <block#> /dev/hda
And pick a block number which *is not* the first one.
5. Was it corrupted?
6. Repeat with the first block number -- is it corrupted?
If 5. and 6. show everything is OK, than use some binary editor to
fix your partition table.
Luck...
On Sunday 14 March 2004 13:07, Dita Jacobovitz wrote:
> We have a Linux machine (IBM ThinkCentre) with Red Hat 9.0 installed which
> suddenly failed to boot. It was working fine before. We have tried 'linux
> rescue' from an installer disk and when we type e2label /dev/hda2 we get an
> error 'Bad magic number in super-block' which We think it indicates that
> something has gone wrong with the main disk partition. We would like to
> recover the data on the partition instead of reformatting since it contains
> some important data.
--
Oron Peled Voice/Fax: +972-4-8228492
[EMAIL PROTECTED] http://www.actcom.co.il/~oron
"Linux: like the air you breathe, ubiquitous and free"
--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]