From owner-freebsd-questions Wed Jan 16 5:29:28 2002 Delivered-To: freebsd-questions@freebsd.org Received: from digitalfreaks.org (digitalfreaks.org [216.151.95.156]) by hub.freebsd.org (Postfix) with SMTP id 2515B37B405 for ; Wed, 16 Jan 2002 05:29:25 -0800 (PST) Received: (qmail 20955 invoked by uid 1000); 16 Jan 2002 13:29:41 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 16 Jan 2002 13:29:41 -0000 Date: Wed, 16 Jan 2002 08:29:41 -0500 (EST) From: Chad Ziccardi To: Mike Meyer Cc: Annelise Anderson , , Subject: Re: Super Block In-Reply-To: <15428.30035.136131.19101@guru.mired.org> Message-ID: <20020116082830.C20463-100000@digitalfreaks.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 15 Jan 2002, Mike Meyer wrote: > Annelise Anderson types: > > On Mon, 14 Jan 2002, Mike Meyer wrote: > > > One-sentence summary of why it's important: It where you start when > > > you want to find a file in the file system. > > Suppose you overwrite a disklabel and haven't made a copy; if you > > can access the slice and you want to write a new disklabel, is > > there any way to find out where the superblocks are? > > Since you don't know the exact sizes, the only way I can think of is > to open the raw disk device, read in struct fs sized chunks at block > intervals, and check fs_magic for "real" superblocks. When you find a > pair that's 32 blocks apart, you've found the superblock and the first > alternate for a file system. Try ffsrecov to find the superblocks on a raw device. ffsrecov -s It's in the ports. -- Chad Ziccardi, Professional Slacker cz@digitalfreaks.org "Some cause happiness wherever they go; others whenever they go." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message