any tool to *find* a filesystem on an ULTRIX disk with trashed partition table?

der Mouse mouse at thunder.mcrcim.mcgill.edu
Mon May 13 19:19:51 AEST 1991


In article <62039 at masscomp.westford.ccur.com>, rtc at westford.ccur.com (Robert Chesler) writes:
> I trashed the root partition on an ULTRIX system disk.  It had a
> non-standard partition table since it was a non-DEC disk.  There are
> two partitions out on the disk that I'd sure like to find.  Anyone
> have any tricks or tools to help do this?

Read the disk sector by sector, looking for a block containing FS_MAGIC
in the appropriate spot.  You may get some false positives, but you
should find the partition's superblock.  To weed out the false
positives, do some of the simple checks fsck does, like make sure
fs_size, fs_dsize, fs_ncg, fs_bsize, fs_fsize, fs_frag, etc, etc are
sane (eg, positive, less than something reasonable...).  That should
get the number of false positives down to where you can start using
fsck to test for them, but if you really want to finish the job
automatically, look for many identical superblocks in sectors whose
numbers are in arithmetical progression - they'll be the backup
superblocks.

(Assuming your Ultrix uses the Berkeley FFS, of course.)

					der Mouse

			old: mcgill-vision!mouse
			new: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.unix.wizards mailing list