bad magic number in super-block

bad magic number in super-block

Post by Kaidi We » Mon, 06 Jun 1994 04:42:06

That's what my linux told me when i boot it.  It didn't finish booting
sequence and stopped in the middle, told me to reboot the machine.
When I reboot the machine, it did the same thing.
I know that I might have screwed up something when I hit reset button
instead of normal shutdown/reboot(No other choice.  When I was compiling
kernel, it froze on me when it tried to compile some configure.c, right
before ask me about my soundcard).
Any idea on how to fix it?  right now my partition is write-protected..
cannot do anything....(can't even edit a file).

While I'm at it, I have another question related to serial port.
I have my mouse on com1, modem on com2(irq3), and old com2 is now on
come4(irq 5).  My old kernel(1.0) used to do auto config irq.  Now
it doesn't do anything.. assume my com4 is using irq3, even i put
a line in rc.serial(like serial-HOWTO suggested).  Any idea where I can
tell kernel to do auto config irq(I looked through drivers/char/serial.c,
didn't find anything, except the kernel default com4 to irq3).
(oh yeah, my new kernel is 1.1.12)


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


Ever found yourself in this situation ?
You've had a power-failure or just did something very bad with your
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

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:

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
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
             may be destroyed.

Example using fsck on a backup superblock:

     /dev/rsd1a:   204540 sectors in 974 cylinders of 6 tracks, 35
     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,
     121184, 124592, 128000, 131408, 134432, 137840,141248, 144656,
     151472, 154880, 158288, 161312, 164720, 168128, 171536, 174944,
     181760, 185168, 188192, 191600, 195008, 198416, 201824,

         In this example, 201824 is the last backup superblock
         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

Hope this helpes some people !

Best regards,

Jan Wilmans

2. Year 2000 problem

3. Newbie: Bad magic number in super-block

4. Set up cache name server on RH6.1

5. bad magic number in super-block

6. Copy Sun CD

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

8. rdist?

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

10. e2fsck: bad magic number in super-block

11. Bad magic number in super-block

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

13. Bad magic number in super-block ?