From owner-freebsd-hackers Wed Sep 8 11:24:57 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from relay.ucb.crimea.ua (relay.ucb.crimea.ua [212.110.138.1]) by hub.freebsd.org (Postfix) with ESMTP id AA01A14BD0; Wed, 8 Sep 1999 11:23:54 -0700 (PDT) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.9.3/8.9.3/UCB) id VAA94979; Wed, 8 Sep 1999 21:21:37 +0300 (EEST) (envelope-from ru) Date: Wed, 8 Sep 1999 21:21:37 +0300 From: Ruslan Ermilov To: David Gilbert Cc: freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: Superblock. Message-ID: <19990908212137.B82130@relay.ucb.crimea.ua> Mail-Followup-To: David Gilbert , freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG References: <14294.41194.422190.809990@trooper.velocet.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.95.3i In-Reply-To: <14294.41194.422190.809990@trooper.velocet.ca>; from David Gilbert on Wed, Sep 08, 1999 at 01:46:18PM -0400 X-Operating-System: FreeBSD 3.2-STABLE i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Sep 08, 1999 at 01:46:18PM -0400, David Gilbert wrote: > So... I lost my partition table. I'm willing to spend a little time > on this. Is there a byte sequence that I might recognise in a > superblock or at the start of a partition? I know this isn't an easy > task, but man 5 fs leads me to believe that I might find: > > #define FS_MAGIC 0x011954 /* the fast filesystem magic number */ > #define FS_OKAY 0x7c269d38 /* superblock checksum */ > > ... but I don't see those bytes. Any hints? > > I'm willing to post a description of a solution for the FAQ if I can > find the filesystems. > > Dave. It's better to find a whole disklabel. According to the disklabel(5): #define DISKMAGIC ((u_long) 0x82564557) /* The disk magic number */ My disk is set in dedicated mode, so: # dd if=/dev/da0c bs=1 skip=1b count=4 | hd 4+0 records in 4+0 records out 4 bytes transferred in 0.022311 secs (179 bytes/sec) 00000000 57 45 56 82 |WEV‚| 00000004 HTH, -- Ruslan Ermilov Sysadmin and DBA of the ru@ucb.crimea.ua United Commercial Bank, ru@FreeBSD.org FreeBSD committer, +380.652.247.647 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message