From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 22:43:13 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C046E16A468; Sat, 9 Jun 2007 22:43:13 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.186]) by mx1.freebsd.org (Postfix) with ESMTP id A46C113C48C; Sat, 9 Jun 2007 22:43:13 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin02-en2 [10.13.10.147]) by smtpout.mac.com (Xserve/smtpout16/MantshX 4.0) with ESMTP id l59MhAq8027718; Sat, 9 Jun 2007 15:43:10 -0700 (PDT) Received: from [172.16.1.3] (209-128-86-226.bayarea.net [209.128.86.226]) (authenticated bits=0) by mac.com (Xserve/smtpin02/MantshX 4.0) with ESMTP id l59Mh8db022070 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 9 Jun 2007 15:43:09 -0700 (PDT) In-Reply-To: <200706092128.l59LSjRs027671@apollo.backplane.com> References: <4AB3C4C0-0DA1-482F-A4CD-375A53332F29@mac.com> <4D7CDA24-48FE-4319-A320-C8D7165E9EBC@mac.com> <200706092128.l59LSjRs027671@apollo.backplane.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <57F8CCC1-1841-41AE-9F82-0C87FE53BE99@mac.com> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Sat, 9 Jun 2007 15:42:58 -0700 To: Matthew Dillon X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, Ivan Voras , freebsd-geom@freebsd.org Subject: Re: GPT - (last) call for action X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2007 22:43:13 -0000 On Jun 9, 2007, at 2:28 PM, Matthew Dillon wrote: > I'm having to tackle this issue right now in DFly. With GPT > having to > start at sector 1 (no choice there), the compatible MBR in > sector 0 > presumably must have a slice (#1) which covers the entire disk. > > But do we have to make slice #1 bootable? Could we also create a > slice #2 in the MBR that points into the GPT's first partition, > mark > it bootable, and thus be able to put boot1 in the GPT's first > partition? > Or will the BIOS fart on the overlapping MBR slices? Technically speaking, the MBR can only have a single partition of type 0xEE that covers the whole disk. This is to protect the GPT from MBR-specific tools that do not know about the GPT. This is not a bootable slice by definition. Practice is different. To support bootcamp on Intel-based Macs, the MBR will have real partitions that mirror GPT partitions or otherwise describe partitions outside the GPT controlled area. These can be bootable partitions and the protective partition (the one with type 0xEE) will not cover the whole disk anymore. The nasty part is keeping MBR and GPT partitions in sync, so it may be better to have the MBR partition fall outside the GPT controlled area. This can be done because the GPT header contains the LBA of the first and last sectors on the disk that can be assigned to a partition. You can free up space for MBR partitions after the primary GPT table by adjusting the first LBA. In the MBR partition you can put a GPT aware boot loader that uses the GPT to find the real partitions... -- Marcel Moolenaar xcllnt@mac.com