From owner-freebsd-hackers Mon Feb 17 07:23:39 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id HAA21348 for hackers-outgoing; Mon, 17 Feb 1997 07:23:39 -0800 (PST) Received: from cheops.anu.edu.au (avalon@cheops.anu.edu.au [150.203.76.24]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id HAA21329 for ; Mon, 17 Feb 1997 07:23:30 -0800 (PST) Message-Id: <199702171523.HAA21329@freefall.freebsd.org> Received: by cheops.anu.edu.au (1.37.109.16/16.2) id AA041022628; Tue, 18 Feb 1997 02:17:08 +1100 From: Darren Reed Subject: Re: File system/disk recovery tools ? To: kuku@gilberto.physik.rwth-aachen.de Date: Tue, 18 Feb 1997 02:17:07 +1100 (EDT) Cc: msmith@atrad.adelaide.edu.au, luigi@labinfo.iet.unipi.it, hackers@freebsd.org In-Reply-To: <199702171443.PAA24698@gilberto.physik.rwth-aachen.de> from "Christoph Kukulies" at Feb 17, 97 03:43:04 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In some mail from Christoph Kukulies, sie said: > > > Luigi Rizzo stands accused of saying: > > > > dd the whole disk off onto a file and mount it on a vnode? You might > > > > > > unfortunately is 1.6GB ... I need to find a bigger unit! > > > > dd bits of it at a time? 8) > > > > > > have to reconstruct the label and such, and using fsck's '-b' option > > > > > > actually an annoying thing with fsck -b is that I never know what > > > to use as an alternate superblock number. 32, says the manpage, is > > > an alternate superblock, but what are others ? I guess they depend > > > upon the geometry of the disk... is there a "magic" number that I > > > can look for ? > > > > You mean you didn't write them down when you made your filesystems? 8) > > > > Ok, presumably your disklabel is OK. Have a look in /sys/ufs/ffs/fs.h > > at the superblock layout; it's 8K long, has a fixed checksum, and > > contains various predictable fields (eg. the last mountpoint). This > > should let you hunt a copy of it down. > > Some time ago I wrote a (really quick and dirty) little program which scanned > the disk for once existing file systems. > > It's too dirty to post in public but if anyone wants it I'll > send it. At least one case beside of my own is known to have been > successful. I've written one of these too (SunOS4) and my comments are the same :-) (btw, it worked too :-) > Bottomline is that you scan the disk for a FS magic and then with the > obtained data (offset and size) you do a dd skip= count= to a file which > then can be used as /dev/vn0 to be mounted and files can be restored > from there. Does dumpfs exist on FreeBSD ? Darren