Date: Thu, 02 Apr 2009 21:44:02 -0700 From: Marcel Moolenaar <xcllnt@mac.com> To: Tai-hwa Liang <avatar@mmlab.cse.yzu.edu.tw> Cc: freebsd-current@freebsd.org Subject: Re: Removal of GEOM_BSD, GEOM_MBR, GEOM_PC98 and GEOM_SUNLABEL Message-ID: <A821815A-63BE-4354-A8A9-6C1C8D277422@mac.com> In-Reply-To: <09040309313414.76643@www.mmlab.cse.yzu.edu.tw> References: <DED07257-A1C7-4504-9A9E-CAAC2A9737D6@mac.com> <95891.1238477069@critter.freebsd.dk> <20090331133132.1e191836@ernst.jennejohn.org> <gqt3um$f77$3@ger.gmane.org> <20090331155542.74d89d64@ernst.jennejohn.org> <60084D1E-9F64-463A-A8E9-7A237D5C7661@mac.com> <0904011910169.29800@www.mmlab.cse.yzu.edu.tw> <DC771BC5-F356-4D81-9082-91C922CCBF38@mac.com> <0904020940371.36257@www.mmlab.cse.yzu.edu.tw> <4CCDEFD6-830E-4C8F-B7A2-B7878F8842BE@mac.com> <0904021314574.37737@www.mmlab.cse.yzu.edu.tw> <E6347C70-099B-494A-89E2-8CBDDAA36A85@mac.com> <09040309313414.76643@www.mmlab.cse.yzu.edu.tw>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A821815A-63BE-4354-A8A9-6C1C8D277422>