From owner-freebsd-questions@FreeBSD.ORG Thu Dec 1 17:21:35 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C08116A41F for ; Thu, 1 Dec 2005 17:21:35 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from mail.united-ware.com (am-productions.biz [69.61.164.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA4EF43D66 for ; Thu, 1 Dec 2005 17:21:31 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from bigguy.am-productions.biz (am-productions.biz [69.61.164.22]) (authenticated bits=0) by mail.united-ware.com (8.13.4/8.13.4) with ESMTP id jB1HQHhE095951 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Thu, 1 Dec 2005 12:26:22 -0500 (EST) (envelope-from mistry.7@osu.edu) From: Anish Mistry To: freebsd-questions@freebsd.org Date: Thu, 1 Dec 2005 12:23:24 -0500 User-Agent: KMail/1.8.3 References: <57750f110511301815m255cfc23g4688eea38f601e37@mail.gmail.com> In-Reply-To: <57750f110511301815m255cfc23g4688eea38f601e37@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1323928.ZNYetqJjfr"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200512011223.34129.mistry.7@osu.edu> X-Spam-Status: No, score=-7.4 required=5.0 tests=ALL_TRUSTED,BAYES_00, MYFREEBSD2 autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on mail.united-ware.com X-Virus-Scanned: ClamAV 0.87/1198/Tue Nov 29 05:05:20 2005 on mail.united-ware.com X-Virus-Status: Clean Cc: Subject: Re: Help deriving a corrupted disklabel X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2005 17:21:35 -0000 --nextPart1323928.ZNYetqJjfr Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 30 November 2005 09:15 pm, Doug H wrote: > One of my disks has 3 active partitions: FreeBSD 5.4-RC3, NTFS > (not-bootable), and FreeBSD 6.0-RELEASE. > > I developed problems while installing FreeBSD 6.0. Installation > went as well as can be expected using sysinstall (no difficulty > other than pulling packages from the CD), but when I rebooted, > nothing was bootable on that disk. I verified that the boot record > (using boot0) seems okay: slice table is fine (40G, 80G, 40G, and > 40G unused on 200G drive). > > Using bsdlabel, I confirmed that slice 3 (FreeBSD 6) is fine, but > for some reason I'm not concerned with now, is unbootable. > > PROBLEM: bsdlabel showed me that slice 1 (FreeBSD 5.4) is damaged > and only partition c existed and was incorrect. I do not have / > cannot find a written copy of my disklabel for that disk (a good > suggestion to *strongly emphasize* in the installation manual for > newbies!). I did recall that ad1s1a ('/') was 512M, so I was able > to write a label and mount that partition from a "Fixit" shell. > > QUESTIONS: How can I rederive the remaining disklabel for that > disk? Could a copy possibly be stored somewhere on root if I > didn't do it myself when building the system? > > I have not tried to boot from that root partition. Trying several > possible labels has resulted in "incorrect super block" errors for > the partitions after 'a'. Random guessing will be very tedious. > > My research has indicated that I could binary grep the raw ad1s1c > partition to locate the magic numbers for the super blocks and > derive the partitions from that information. I even found a little > 'c' language program Peter Dufault posted 11 years ago on this list > to locate magic numbers. > > My hope is that in 11 years of development, FreeBSD would have > created a clever tool to aid this process! I've found enough > entries in these lists to think that the effort would be justified > and much appreciated. If there is no tool, can someone tell me the > value of FS_UFS2_MAGIC? I presume that's what I should search for > - it's a UFS2 filesystem. Having only a "Fixit" shell is somewhat > limiting. > sysutils/scan_ffs I've always used it from a emergency FreeBSD diagnostic CD (custom=20 =46reesbie) and it works great. I've never been stuck with only a=20 fixit shell though. =2D-=20 Anish Mistry --nextPart1323928.ZNYetqJjfr Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDjzGWxqA5ziudZT0RAndtAKCsPtZrIGzaFeLHB3AygHz9BkZqlQCfThCh 14Ls8GUhrpC9lZ6Jqj8f6nA= =PqBm -----END PGP SIGNATURE----- --nextPart1323928.ZNYetqJjfr--