From owner-freebsd-questions Mon Jul 8 16:47:22 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA21785 for questions-outgoing; Mon, 8 Jul 1996 16:47:22 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id QAA21780 for ; Mon, 8 Jul 1996 16:47:19 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id QAA23007; Mon, 8 Jul 1996 16:41:22 -0700 From: Terry Lambert Message-Id: <199607082341.QAA23007@phaeton.artisoft.com> Subject: Re: Partition table gone. Fixable? To: dougal@iquest.com (Dougal Campbell) Date: Mon, 8 Jul 1996 16:41:22 -0700 (MST) Cc: questions@freebsd.org In-Reply-To: from "Dougal Campbell" at Jul 8, 96 02:30:03 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I've got a drive whose partition table was damaged somehow. Is there any > way to restore the partition table, and recover the filesystem data? Can > this be done with disklabel? The man pages aren't clear as to whether the > partition table is part of the "label", but it sort of implies such. > > Is the data salvagable, or am I just boned? It is salvagable. This is a non-trivial task. It has been discussed on this list before, and your best bet would be to go through the list archives. Do you know if it was the actualy partition table (the front of the physical disk)? Or was it just the disklabel (there are options to disklabel, used during install, that will let you write a label wothout reading it first). You will probably need to reset the BSD bootstrap on the disk (-B). To find the actual FS start offsets, you will need to read through the disk a sector at a time looking for the FS "magic numbers"; see the list archives referenced before for details. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.