From owner-freebsd-current@FreeBSD.ORG Mon Jun 11 20:12:06 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7485216A400; Mon, 11 Jun 2007 20:12:06 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by mx1.freebsd.org (Postfix) with ESMTP id 531DF13C45E; Mon, 11 Jun 2007 20:12:06 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay8.apple.com (relay8.apple.com [17.128.113.38]) by mail-out3.apple.com (Postfix) with ESMTP id B6863889BA9; Mon, 11 Jun 2007 13:11:01 -0700 (PDT) Received: from relay8.apple.com (unknown [127.0.0.1]) by relay8.apple.com (Symantec Mail Security) with ESMTP id 2DFDB40080; Mon, 11 Jun 2007 13:12:06 -0700 (PDT) X-AuditID: 11807126-9e882bb00000081c-dc-466dac95833b Received: from [17.214.13.96] (cswiger1.apple.com [17.214.13.96]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by relay8.apple.com (Apple SCV relay) with ESMTP id E89C240024; Mon, 11 Jun 2007 13:12:05 -0700 (PDT) In-Reply-To: <86lkeqxo89.wl%rpaulo@fnop.net> References: <4AB3C4C0-0DA1-482F-A4CD-375A53332F29@mac.com> <4D7CDA24-48FE-4319-A320-C8D7165E9EBC@mac.com> <200706092128.l59LSjRs027671@apollo.backplane.com> <57F8CCC1-1841-41AE-9F82-0C87FE53BE99@mac.com> <200706101752.l5AHqdE0035954@apollo.backplane.com> <8B01C1EC-D61A-484F-B308-6D6C8EB00EE6@mac.com> <861wgjwnrw.wl%rpaulo@fnop.net> <200706102143.l5ALhQut038340@apollo.backplane.com> <86zm37v4ns.wl%rpaulo@fnop.net> <86lkeqxo89.wl%rpaulo@fnop.net> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Mon, 11 Jun 2007 13:12:04 -0700 To: Rui Paulo X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== Cc: freebsd-hackers@freebsd.org, Marcel Moolenaar , freebsd-current@freebsd.org, freebsd-geom@freebsd.org Subject: Re: GPT - (last) call for action 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: Mon, 11 Jun 2007 20:12:06 -0000 On Jun 11, 2007, at 12:52 PM, Rui Paulo wrote: >> A typical Intel Mac system using GPT ought to look something like >> this: >> >> # fdisk /dev/rdisk0 >> Disk: /dev/rdisk0 geometry: 9964/255/63 [160086528 sectors] >> Signature: 0xAA55 >> Starting Ending >> #: id cyl hd sec - cyl hd sec [ start - size] >> --------------------------------------------------------------------- >> --- >> 1: EE 1023 254 63 - 1023 254 63 [ 1 - 160086520] >> >> 2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused >> 3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused >> 4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused >> >> # gpt -r show /dev/rdisk0 >> start size index contents >> 0 1 PMBR >> 1 1 Pri GPT header >> 2 32 Pri GPT table >> 34 6 >> 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B- >> xxxxxxxxxxxx >> 409640 159414704 2 GPT part - 48465300-0000-11AA-AA11- >> xxxxxxxxxxxx >> 159824344 262151 >> 160086495 32 Sec GPT table >> 160086527 1 Sec GPT header > > Well, what's happening is that Boot Camp syncs the BIOS partition > table with the GPT table, so the first partition should start at 40, > just like the GPT. > > Why does it start at 40 ? Because you need room for the PMBR, the > Primary GPT header and the Primary GPT table. Agreed, you need about 32 sectors for the GPT header+table. > Now, you don't seem to have used Boot Camp on your Mac, right? It's true that the machine in question has never used BootCamp, correct. > If you ever use it, fdisk /dev/rdisk0 will show things differently. > The first partition with id 0xEE will should start at LBA 40 and end > at LBA 409640. OK: although that surprises me a bit, perhaps trying to get Windows XP (which may not understand the ~32 sector GPT header+table) means that claiming the first partition in the MBR starts at 40 works better...? >> The first, small partition is almost certainly a "boothfs" boot >> partition, as described in the man page for Apple's version of >> fdisk: > > I don't think so. > The boothfs partition doesn't seem to be used on Intel Macs no > longer. The EFI boot loader that comes with Intel Macs can read HFS+ > without any help (actually it's an EFI module), so bootufs/boothfs > partitions are no longer required. It looks like you're right-- the OS-X formatting utilities still reserve space for the boot partition, but they just scribble enough to this space to indicate that the partition isn't actually bootable: # dd if=/dev/disk0s1 bs=512 count=409600 | hexdump -C 00000000 eb 58 90 42 53 44 20 20 34 2e 34 00 02 01 20 00 |.X.BSD 4.4... .| 00000010 02 00 00 00 00 f0 00 00 00 00 00 00 28 00 00 00 |............(...| 00000020 00 40 06 00 67 0c 00 00 00 00 00 00 02 00 00 00 |.@..g...........| 00000030 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 00 00 29 f4 11 60 28 45 46 49 20 20 20 20 20 20 |..)..` (EFI | 00000050 20 20 46 41 54 33 32 20 20 20 fa 31 c0 8e d0 bc | FAT32 .1....| 00000060 00 7c fb 8e d8 e8 00 00 5e 83 c6 19 bb 07 00 fc |.|......^.......| 00000070 ac 84 c0 74 06 b4 0e cd 10 eb f5 30 e4 cd 16 cd |...t.......0....| 00000080 19 0d 0a 4e 6f 6e 2d 73 79 73 74 65 6d 20 64 69 |...Non- system di| 00000090 73 6b 0d 0a 50 72 65 73 73 20 61 6e 79 20 6b 65 | sk..Press any ke| 000000a0 79 20 74 6f 20 72 65 62 6f 6f 74 0d 0a 00 00 00 |y to reboot.....| 000000b0 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.| 00000200 52 52 61 41 00 00 00 00 00 00 00 00 00 00 00 00 | RRaA............| 00000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000003e0 00 00 00 00 72 72 41 61 ff ff ff ff ff ff ff ff |....rrAa........| 000003f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00000400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000c00 eb 58 90 42 53 44 20 20 34 2e 34 00 02 01 20 00 |.X.BSD 4.4... .| 00000c10 02 00 00 00 00 f0 00 00 00 00 00 00 28 00 00 00 |............(...| 00000c20 00 40 06 00 67 0c 00 00 00 00 00 00 02 00 00 00 |.@..g...........| 00000c30 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000c40 00 00 29 f4 11 60 28 45 46 49 20 20 20 20 20 20 |..)..` (EFI | 00000c50 20 20 46 41 54 33 32 20 20 20 fa 31 c0 8e d0 bc | FAT32 .1....| 00000c60 00 7c fb 8e d8 e8 00 00 5e 83 c6 19 bb 07 00 fc |.|......^.......| 00000c70 ac 84 c0 74 06 b4 0e cd 10 eb f5 30 e4 cd 16 cd |...t.......0....| 00000c80 19 0d 0a 4e 6f 6e 2d 73 79 73 74 65 6d 20 64 69 |...Non- system di| 00000c90 73 6b 0d 0a 50 72 65 73 73 20 61 6e 79 20 6b 65 | sk..Press any ke| 00000ca0 79 20 74 6f 20 72 65 62 6f 6f 74 0d 0a 00 00 00 |y to reboot.....| 00000cb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000df0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00000e00 52 52 61 41 00 00 00 00 00 00 00 00 00 00 00 00 | RRaA............| 00000e10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000fe0 00 00 00 00 72 72 41 61 ff ff ff ff ff ff ff ff |....rrAa........| 00000ff0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00001000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00004000 f0 ff ff 0f ff ff ff 0f ff ff ff 0f 00 00 00 00 |................| 00004010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00190e00 f0 ff ff 0f ff ff ff 0f ff ff ff 0f 00 00 00 00 |................| 00190e10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 0031dc00 45 46 49 20 20 20 20 20 20 20 20 08 00 00 00 00 | EFI .....| 0031dc10 00 00 00 00 00 00 1b a7 85 35 00 00 00 00 00 00 |......... 5......| 0031dc20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 409600+0 records in 409600+0 records out -- -Chuck