Fortunately, the filesystem keeps numerious copies of the superblock on the disk. You just need to find out where they are! Actually, the locations of backup superblocks are printed to the screen when the filesystem is created (not that this helps you now, right). If I remember correctly though, superblocks are place at regular, predictable places on the parttion. As an exercise, try creating a filesystem on a floppy drive and watch where the superblocks are place. On my system I create a 10MB file and the make an Ext2 filesystem on it and get:
chilin$ dd if=/dev/zero of=fs.bin bs=1024 count=10240 10240+0 records in 10240+0 records out chilin$ mke2fs fs.bin mke2fs 1.10, 24-Apr-97 for EXT2 FS 0.5b, 95/08/09 fs.bin is not a block special device. Proceed anyway? (y,n) y Linux ext2 filesystem format Filesystem label= 2560 inodes, 10240 blocks 512 blocks (5.00%) reserved for the super user First data block=1 Block size=1024 (log=0) Fragment size=1024 (log=0) 2 block groups 8192 blocks per group, 8192 fragments per group 1280 inodes per group Superblock backups stored on blocks: 8193 Writing inode tables: done Writing superblocks and filesystem accounting information: done chilin$ So, try to run fsck like 'e2fsck -b 8193 /dev/XXX' and see what you get. If that doesn't net you anything you might try to guess where another superblock will be. Or, you could try something more drastic. The mke2fs man page talk about a '-S' option: -S Write superblock and group descriptors only. This is useful if all of the superblock and backup superblocks are corrupted, and a last-ditch recovĀ ery method is desired. It causes mke2fs to reiniĀ tialize 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. Good luck (from someone else who was trying to bring back a failing disk from the brink this weekend). Christopher Judd wrote: > I'm a relative newcomer to linux (used Amiga's for years). I've > been running a bo system for about six months. This morning the system > crashed and will not boot from the hard disk. I booted from the rescue > disk but cannot mount /hda3 (/hda1=w95, /hda2=swap). e2ckfs reports a > bad superblock. Is there a way to create a new superblock so that I can > mount this drive? > > -Chris > > -- > TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to > [EMAIL PROTECTED] . > Trouble? e-mail to [EMAIL PROTECTED] . -- Jens B. Jorgensen [EMAIL PROTECTED] -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .