From owner-freebsd-scsi Mon Jun 21 0:38:15 1999 Delivered-To: freebsd-scsi@freebsd.org Received: from florence.pavilion.net (florence.pavilion.net [194.242.128.25]) by hub.freebsd.org (Postfix) with ESMTP id 997DE15154; Mon, 21 Jun 1999 00:38:05 -0700 (PDT) (envelope-from joe@florence.pavilion.net) Received: (from joe@localhost) by florence.pavilion.net (8.9.2/8.8.8) id IAA10093; Mon, 21 Jun 1999 08:38:03 +0100 (BST) (envelope-from joe) Date: Mon, 21 Jun 1999 08:38:03 +0100 From: Josef Karthauser To: hackers@freebsd.org, scsi@freebsd.org Subject: [DISKLABEL FRAGGED] Clues requested... ;) Message-ID: <19990621083803.M95198@pavilion.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i X-NCC-RegID: uk.pavilion Organisation: Pavilion Internet plc, 24 The Old Steine, Brighton, BN1 1EL, England Phone: +44-845-333-5000 Fax: +44-845-333-5001 Mobile: +44-403-596893 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Guess what... I've got a disk where the partition table and the disklabel has mysteriously disappeared! Oops. I've reconstructed the partition table, and now need to partition the disklabel. If I mount /dev/wd2s1c I get the root (/) partition back, although the size is obviously bogus in the disklabel; now I'd like to search for the other partitions. /etc/disktab tells me which partitions there used to be, but I don't know where they start, or how large they are. I'm guessing that it should be a fairly simple process of scanning the disk for superblocks and from them I should be able to determine the start of each partition and the sizes from there. Can anyone fill me in on what to look for superblock wise please? I've spent a few hours reading the fsck docs and scanning through the header files and source code, but haven't found the answer yet. The data on the disk isn't crucial, I can rebuild the system if necessary, but it seems that maybe I can spend less time writing a recovery tool than it would take to start from scratch. Thanks in advance, Joe -- Josef Karthauser FreeBSD: How many times have you booted today? Technical Manager Viagra for your server (http://www.uk.freebsd.org) Pavilion Internet plc. [joe@pavilion.net, joe@uk.freebsd.org, joe@tao.org.uk] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message