Error when booting; bad magic number in super-block; please help!

Error when booting; bad magic number in super-block; please help!

Post by Bo » Thu, 08 Apr 1999 04:00:00



I am new to the Linux world and am having lots of fun learning how to
use it.

I ran into a problem yesterday.  Upon booting, Linux reports:

**********************************************
[/sbin/fsck.ext2] fsck.ext2 -a /dev/hdb
    hdb:hdb4
fsck.ext2: Bad magic number in super-block while trying to open /dev/hdb

/dev/hdb:
    The super-block 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 super-block
is corrupt, and you might try running e2fsck with an alternate
super-block:
    e2fsck -b 8193 <device>
**********************************************

Linux then gives me a root prompt to correct the problem.  I had done
two things (that I can think of) at my last login before I started
getting this error:  1) installed KDE (worked fine), and 2) forgot to
unmount my Zip drive (hdb4) before shutting down my system.  I tend to
think it may be a problem with not umount(ing) before shutdown.  I had
used my zip drive to read files from a disk formatted under windows.  I
tried the suggested e2fsck but this did not help (as far as I can tell).

What do I do?  Is this a problem from not umount(ing) the zip drive
before shutdown?  Can this be fixed with out having to re-install
anything?

I'm using RedHat 5.2 on a PC.  I boot from a floppy instead of having
LILO in the MBR.

Thanks in advance,
Bo

 
 
 

1. Bad magic number in super-block / Group descriptors look bad

Hi,

Ever found yourself in this situation ?
You've had a power-failure or just did something very bad with your
harddisk
and now when trying to mount it fsck screams:

Group descriptors look bad... trung backup blocks....
/sbin/e2fsck: Bad magic number in super-block while trying to open
/dev/hdb1

I've had this problem 2 times before now, and i've had a hell of a
time finding any docs related. I DID eventually find this:
(Note: text below is copy-pasted together from several articles, and
so not
 written by myself...)

----- begin of article pastes ----------------

From MANPAGES of mke2fs:

-S
Write superblock and group descriptors only. This is useful if all of
the superblock and backup superblocks are corrupted,
 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 guarantee that any data will be salvageable.

Ofcourse you're should only try this when you've exhausted all other
options.
Other options are:

fsck -b 32 /dev/hdb1  (use the first backup super-block)

To determine the locations of the backup superblocks:
# newfs -N /dev/r

    Caution: Use the "N" option. If the "n" option is used, the
filesystem
             may be destroyed.

Example using fsck on a backup superblock:

     /dev/rsd1a:   204540 sectors in 974 cylinders of 6 tracks, 35
sectors
     104.7MB in 61 cyl groups (16 c/g, 1.72MB/g, 768 i/g)
     super-block backups (for fsck -b #) at:
     32, 3440, 6848, 10256, 13664, 17072, 20480, 23888, 26912,
     30320, 33728, 37136, 40544, 43952, 47360, 50768, 53792, 57200,
     60608, 64016, 67424, 70832, 74240, 77648, 80672, 84080, 87488,
     90896, 94304, 97712, 101120, 104528, 107552, 110960, 114368,
117776,
     121184, 124592, 128000, 131408, 134432, 137840,141248, 144656,
148064,
     151472, 154880, 158288, 161312, 164720, 168128, 171536, 174944,
178352,
     181760, 185168, 188192, 191600, 195008, 198416, 201824,

         In this example, 201824 is the last backup superblock
location
         198416 is the next to last backup superblock location.

------------- end of article pastes --------------
Also it's interesting to note that it seems the larger the disk
the less backup super-block are stored.. I my case, on a 40 GB Maxtor:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,
2654208, 4096000

where the only backups, (the newfs command mentioned above, was not
installed here, and i could not find it anywhere) i learned this only
after mk2fs told me after it had written the new super-block to my
disk...

Hope this helpes some people !

Best regards,

Jan Wilmans

2. useradd on Netra X1 keeps trying same UID

3. Bad magic number in super-block (help!)

4. Defrag won't compile.

5. HELP!! - bad magic number in super-block.

6. linux win'98

7. Newbie: Bad magic number in super-block

8. Good PCI gfx board <= $200??

9. bad magic number in super-block

10. e2fsck: bad magic number in super-block

11. Bad magic number in super-block

12. Bad magic number in super-block ?

13. bad magic number in super-block