You are not logged in.

#1 2007-11-11 19:35:38

hardframed
Member
Registered: 2007-08-03
Posts: 25

e2fsck: Bad magic number in super-block

e2fsck: Bad magic number in super-block while trying to open /dev/hda1

Yup, a very tricky one this is. I did the following:

[root@(none)~]#e2fsck /dev/hda1
e2fsck 1.40.2 (12-jul-2007)
/dev/hda1: clean, 310310/4702208 files, 8118002/9396009 blocks

What can I do to fix the super-block? I unable to boot up my system right now, and I can't afford to format my disk.
I have systemrescuedisk with the TestDisk application at hand(if needed?).


With a linux system, you can smell the victory.
With a arch system, you can taste it.

Offline

#2 2007-11-12 00:07:46

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: e2fsck: Bad magic number in super-block

There is a backup superblock every 8192 blocks if i'm correct. So the next one is at 8193. Try telling e2fsck to use that to fix your partition.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2007-11-12 00:33:10

hardframed
Member
Registered: 2007-08-03
Posts: 25

Re: e2fsck: Bad magic number in super-block

B wrote:

There is a backup superblock every 8192 blocks if i'm correct. So the next one is at 8193. Try telling e2fsck to use that to fix your partition.

I've tried that, with no luck I'm afraid. So I've gotten more serious and.

With Testdisk I managed to indentify these superblocks.

[Superblocks] where * means it has been e2fsck'ed

0, blocksize=4096*
32768, blocksize=4096*
98304, blocksize=4096*
163840, blocksize=4096*
229376, blocksize=4096*
294912, blocksize=4096*
819200, blocksize=4096*
884736, blocksize=4096*
1605632, blocksize=4096*
2654208, blocksize=4096*
umount /dev/hda1
e2fsck -b 32768 /dev/hda1
/dev/hda1 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
<4 minutes later>
I get the question:
Free inodes count wrong for group #1 (ie. 32254, counted=231)
Fix<y>? y
This question got repeated #286 times, where I answered the same (y) each time.

/dev/hda1: ********* FILE SYSTEM WAS MODIFIED ************
/dev/hda1: ********* REBOOT LINUX **************
/dev/hda1: 310310/4702208 files (1.5% non-contiguous), 8118002/9396009 blocks

So i rebooted... but still the same error occurs during kernel boot. So now I figured I had
to do the same with 98304 and so forth. YUP! I was right, this superblock was dirty too.

e2fsck -b 98304 /dev/hda1

answer yes to all. Reboot, and repeat with 162840. Until your kernel manages to mount
your disk cleanly and hopefully boot up.

Sadly when I e2fsck -b 98304 /dev/hda1 yet again just to check, it still claims to be dirty.

Now I'm kinda back to where I started.

I will look further into if testdisk can provide some automagic solution to my problem.

Pointers is apprecieted!


With a linux system, you can smell the victory.
With a arch system, you can taste it.

Offline

#4 2007-11-12 18:13:30

hardframed
Member
Registered: 2007-08-03
Posts: 25

Re: e2fsck: Bad magic number in super-block

funny how I managed to solve this problem. It all started when I installed gensplash, and followed the wiki. As you can see from the recent posts, my filesystem was not mounted during boot because of "dirty" superblock.

After researching quite a lot for many hours, I looked at the fstab (just to be on the safe side), and low and behold. For some very weird reason, my filesystem was declared as a sda1 and sda2. Wtf? I knew for certain this was a hda1 and hda5. I changed it back to hda1/hda5 and voila. My system booted up successfully.

How can this be? How can /etc/fstab get changed just by installing gensplash?


With a linux system, you can smell the victory.
With a arch system, you can taste it.

Offline

Board footer

Powered by FluxBB