Bad SuperBlock - ext2fs vs Win95

Bad SuperBlock - ext2fs vs Win95

Post by Robert Nicho » Sat, 17 May 1997 04:00:00



Note: E-mailed *and* posted.



:I managed to corrupt my root file system on
:a backup EIDE disk.  I could mount the partition
:read-only, but got a kernel panic if attempted
:mount read-write.  The particulars:
:
:   1st drive: (toy factory system)
:        hda1 - Win95
:
:   2nd drive:  (experimental system)
:        hdb1 - Dos 6.22
:        hdb2 -  Linux native on / --> CORRUPTED
:        hdb3 -  Linux swap
:
:    3rd drive: (production system)
:        hdc1 -  Linux native on /boot
:        hdc2  - Linux native on /
:        hdc3  - Linux swap
[scenario deleted]

I think that your D: file system is larger than the partition it's on.
It's very easy to do that if you use a non-DOS 'fdisk' utility to create
DOS partitions.  When you use a foreign 'fdisk' to repartition a disk
that previously contained a DOS FAT file system, the old file system
header does not get erased.  When you use the DOS FORMAT command on that
partition, it believes the parameters in the old header even though they
disagree with the partition table.  As you fill up that file system, the
beginning of the next partition gets overwritten.

This is why the Linux 'fdisk' utility contains warnings about creating
DOS partitions.

--


PGP public key 1024/9A9C7955
Key fingerprint = 2F E5 82 F8 5D 06 A2 59  20 65 44 68 87 EC A7 D7

 
 
 

1. Q: Repairing ext2fs with bad superblock

I need help repairing an ext2fs with a bad superblock.

In Solaris it is easy to fix a file system with a corrupted
superblock, simply:

        solairs> newfs -N <block device>
        solairs> fsck -o b=<superblock>

Linux ext2fs has:

        linux> e2fsck -b <superblock>

I can't find any way to get a list of superblocks in Linux.  Is there
any way to do this in Linux?

In Solaris, 32 is always a backup superblock. Are there any backup
superblocks that can be counted on in Linux ext2fs?

Dan

2. XFree86 3.3.2 dumps core during make

3. Linux vs OS2 vs NT vs Win95 vs Multics vs PDP11 vs BSD geeks

4. Urgent!..Capturing Commands (session activities)

5. NFS wrong fs type, bad option, bad superblock, etc

6. @ Upgrading Kernal

7. bad partition on good disk won't mount or fsck (bad magic number/superblock)

8. Diagnostic diskettes

9. Bad Superblock -> Bad Magic Number ->Segmentation fault?

10. mount: wrong fs type, bad option, bad superblock on /dev/hdc1,

11. How to `un-format` i.e. restore superblock on ext2fs-disk?

12. undelete on ext2fs | recover vs. undelete vs. debugfs

13. ext2fs formatted can I get my old superblock back