RE: [ILUG] Bad day for my partition table...

From: Kenn Humborg (kenn at domain bluetree.ie)
Date: Tue 11 Jul 2000 - 16:14:55 IST


> > Actually, do an e2fsck first to see how fscked the filesystem is.
> >
>
> Okay - I recreated the partition table as it was. However e2fsck
> doesn't see /dev/hda5 as a valid filesystem - reports "bad magic number in
> super block" and debugfs can't open this partition as a filesystem. I can
> use debugfs to browse/view/recover the contents of other partitions okay,
> but not /dev/hda5.
>
> I'd say this is due to those first few blocks of swap overwriting the
> first few blocks of /dev/hda5. /dev/hda5 was using 658 -> 1295 but the
> partition table that clobbered it moved my swap to 658->666.
>
> Does anyone know how often superblocks occur or at what intervals they
> occur?

Try 8193, 16385 and so on. Here's the output from creating an ext2
filesystem within a 256MB file:

# mke2fs img
mke2fs 1.10, 24-Apr-97 for EXT2 FS 0.5b, 95/08/09
img is not a block special device.
Proceed anyway? (y,n) y
Linux ext2 filesystem format
Filesystem label=
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=1
Block size=1024 (log=0)
Fragment size=1024 (log=0)
32 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
        8193, 16385, 24577, 32769, 40961, 49153, 57345, 65537, 73729,
        81921, 90113, 98305, 106497, 114689, 122881, 131073, 139265, 147457,
        155649, 163841, 172033, 180225, 188417, 196609, 204801, 212993,
221185,
        229377, 237569, 245761, 253953

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

Later,
Kenn



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:50 GMT