From owner-freebsd-fs Sat Dec 28 10:50:21 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CCA737B401 for ; Sat, 28 Dec 2002 10:50:20 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A32743EC5 for ; Sat, 28 Dec 2002 10:50:20 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.6/8.12.5) with SMTP id gBSIoK1Z022294; Sat, 28 Dec 2002 13:50:20 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Sat, 28 Dec 2002 13:50:20 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Pawel Jakub Dawidek Cc: freebsd-fs@freebsd.org Subject: Re: Recovering data after fdisk -BI. In-Reply-To: <20021227220537.GA32737@prioris.mini.pw.edu.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, 27 Dec 2002, Pawel Jakub Dawidek wrote: > Hello... > > There is a chance to recover data after: > > # fdisk -BI /dev/ad0 > > then I've run fdisk from /stand/sysinstall and I've set partitions again > (I think I remember correct sizes of partitions). > > So now I got /dev/ad0s1 and /dev/ad0s2, I haven't run disklabel yet. > Erlier there was /dev/ad0s2a and /dev/ad0s2b (swap) and I think I remember > their sizes as well. > > Please tell me, that there is some way to recover /dev/ad0s2a. Try: http://www.watson.org/~robert/scan_ffs_freebsd4.tgz This is an adaptation of the OpenBSD scan_ffs(8) tool, which searches for superblocks and reconstructs a disk label from the results. It's not perfect, but actually works surprisingly well. It recognizes only UFS1 file systems, but could do UFS2 with fairly trivial changes. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message