From owner-freebsd-current@FreeBSD.ORG Fri Apr 3 05:29:56 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 62BFC106566C for ; Fri, 3 Apr 2009 05:29:56 +0000 (UTC) (envelope-from avatar@mmlab.cse.yzu.edu.tw) Received: from www.mmlab.cse.yzu.edu.tw (www.mmlab.cse.yzu.edu.tw [140.138.150.166]) by mx1.freebsd.org (Postfix) with ESMTP id 0331E8FC12 for ; Fri, 3 Apr 2009 05:29:55 +0000 (UTC) (envelope-from avatar@mmlab.cse.yzu.edu.tw) Received: by www.mmlab.cse.yzu.edu.tw (qmail, from userid 1000) id 7C561E43407; Fri, 3 Apr 2009 13:29:33 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mmlab.cse.yzu.edu.tw; s=test; t=1238736573; bh=xkEwjNWv9NwEVosWiIzFGWv72xwgTkxNGaPmnVJVgNc=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=s1UYl+eNTUfHs+WMX2jefw5bcZ/nsB71xOwN/p1IgqIUphoH5VrzUBcCApiM1y5ap ERHJPiz4k8wU/7bSPizbFDVKuOphQBcTg9/drT67I6nd0JhvA9FKmEW5djbkIBt+zK q/+IuWTJAsYl2tO0RJ4f0vxUlMywX26lLb5OY/04= Received: from localhost (localhost [127.0.0.1]) by www.mmlab.cse.yzu.edu.tw (qmail) with ESMTP id 7A8F6E43406; Fri, 3 Apr 2009 13:29:33 +0800 (CST) Date: Fri, 3 Apr 2009 13:29:33 +0800 (CST) From: Tai-hwa Liang To: Marcel Moolenaar In-Reply-To: Message-ID: <0904031327195.78401@www.mmlab.cse.yzu.edu.tw> 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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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 05:29:56 -0000 On Thu, 2 Apr 2009, Marcel Moolenaar wrote: [...] > 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. Much better. I can see extended partition nodes after booting with the patched kernel: # ls -la /dev/ad* crw-r----- 1 root operator 0, 73 4 3 21:12 /dev/ad0 crw-r----- 1 root operator 0, 79 4 3 21:12 /dev/ad0s1 crw-r----- 1 root operator 0, 80 4 3 21:12 /dev/ad0s2 crw-r----- 1 root operator 0, 82 4 3 21:12 /dev/ad0s2a crw-r----- 1 root operator 0, 83 4 3 21:12 /dev/ad0s2b crw-r----- 1 root operator 0, 84 4 3 21:12 /dev/ad0s2d crw-r----- 1 root operator 0, 85 4 3 21:12 /dev/ad0s2e crw-r----- 1 root operator 0, 81 4 3 21:12 /dev/ad0s3 crw-r----- 1 root operator 0, 86 4 3 21:12 /dev/ad0s3+00000001 crw-r----- 1 root operator 0, 88 4 3 21:12 /dev/ad0s3+000410a1 crw-r----- 1 root operator 0, 90 4 3 21:12 /dev/ad0s3+00103bf1 crw-r----- 1 root operator 0, 92 4 3 21:12 /dev/ad0s3+0017cda1 lrwxr-xr-x 1 root wheel 14 4 3 21:12 /dev/ad0s5 -> ad0s3+00000001 lrwxr-xr-x 1 root wheel 14 4 3 21:12 /dev/ad0s6 -> ad0s3+000410a1 lrwxr-xr-x 1 root wheel 14 4 3 21:12 /dev/ad0s7 -> ad0s3+00103bf1 lrwxr-xr-x 1 root wheel 14 4 3 21:12 /dev/ad0s8 -> ad0s3+0017cda1 # gpart show => 63 228338775 ad0 MBR (109G) 63 18688257 1 !12 (8.9G) 18688320 16783200 2 freebsd [active] (8.0G) 35471520 192855600 3 !15 (92G) 228327120 11718 - free - (5.7M) => 0 16783200 ad0s2 BSD (8.0G) 0 786432 1 freebsd-ufs (384M) 786432 4194304 2 freebsd-swap (2.0G) 4980736 393216 4 freebsd-ufs (192M) 5373952 11409248 5 freebsd-ufs (5.4G) => 0 192855600 ad0s3 EBR (92G) 0 16783200 1 !131 (8.0G) 16783200 50243760 266401 !11 (24G) 67026960 31251024 1063921 freebsd (15G) 98277984 94577616 1559969 freebsd (45G) The only downside is that I'll have to update /etc/fstab to boot correctly as /dev/ad0s7a is still missing. -- Thanks, Tai-hwa Liang