From owner-freebsd-current@FreeBSD.ORG Fri Apr 3 04:44:09 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68A281065673 for ; Fri, 3 Apr 2009 04:44:09 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout020.mac.com (asmtpout020.mac.com [17.148.16.95]) by mx1.freebsd.org (Postfix) with ESMTP id 47F728FC17 for ; Fri, 3 Apr 2009 04:44:09 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from MacBook-Pro.lan.xcllnt.net (mail.xcllnt.net [75.101.29.67]) by asmtp020.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KHI000QJD5F5610@asmtp020.mac.com> for freebsd-current@freebsd.org; Thu, 02 Apr 2009 21:44:04 -0700 (PDT) Message-id: From: Marcel Moolenaar To: Tai-hwa Liang In-reply-to: <09040309313414.76643@www.mmlab.cse.yzu.edu.tw> Date: Thu, 02 Apr 2009 21:44:02 -0700 References: <95891.1238477069@critter.freebsd.dk> <20090331133132.1e191836@ernst.jennejohn.org> <20090331155542.74d89d64@ernst.jennejohn.org> <60084D1E-9F64-463A-A8E9-7A237D5C7661@mac.com> <0904011910169.29800@www.mmlab.cse.yzu.edu.tw> <0904020940371.36257@www.mmlab.cse.yzu.edu.tw> <4CCDEFD6-830E-4C8F-B7A2-B7878F8842BE@mac.com> <0904021314574.37737@www.mmlab.cse.yzu.edu.tw> <09040309313414.76643@www.mmlab.cse.yzu.edu.tw> X-Mailer: Apple Mail (2.930.3) Cc: freebsd-current@freebsd.org Subject: Re: Removal of GEOM_BSD, GEOM_MBR, GEOM_PC98 and GEOM_SUNLABEL X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2009 04:44:10 -0000 On Apr 2, 2009, at 6:35 PM, Tai-hwa Liang wrote: > On Thu, 2 Apr 2009, Marcel Moolenaar wrote: >> Can you dump the first 2 sectors of slice 3 and >> send it to me: >> dd if=/dev/ad0s3 of=/tmp/dump.dd count=2 bs=512 *snip* > 000001b0 00 00 00 00 00 f2 0e 00 00 00 00 00 00 00 00 01 > |................| > 000001c0 c1 ff 83 ef ff ff 3f 00 00 00 21 17 00 01 00 00 > |......?...!.....| > 000001d0 c1 ff 05 ef ff ff 60 17 00 01 b0 a8 fe 02 00 00 > |......`.........| > 000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > |................| > 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa > |..............U.| *snip* It looks like you have a boot menu entry at 0x1b6. Can you try the following patch: Index: g_part_ebr.c =================================================================== --- g_part_ebr.c (revision 190655) +++ g_part_ebr.c (working copy) @@ -403,9 +403,13 @@ if (magic != DOSMAGIC) goto out; - /* The sector is all zeroes, except for the partition entries. */ + /* + * The sector is all zeroes, except for the partition entries + * and a possible IBM Boot Manager menu entry. The menu entry + * is 9 bytes in length and preceeds the partition entries. + */ sum = 0; - for (index = 0; index < DOSPARTOFF; index++) + for (index = 0; index < DOSPARTOFF - 9; index++) sum += buf[index]; if (sum != 0) goto out; The real fix will be a bit more involved, because we should avoid wiping out the boot menu entry on a write. But at least with the patch you should be able to read the EBR. Thanks, -- Marcel Moolenaar xcllnt@mac.com