Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LwEAG-0008PM-3o for mharc-grub-devel@gnu.org; Tue, 21 Apr 2009 07:29:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwEAB-0008O6-3U for grub-devel@gnu.org; Tue, 21 Apr 2009 07:29:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwEA4-0008MO-LW for grub-devel@gnu.org; Tue, 21 Apr 2009 07:29:16 -0400 Received: from [199.232.76.173] (port=34627 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwEA3-0008Ly-0k for grub-devel@gnu.org; Tue, 21 Apr 2009 07:29:11 -0400 Received: from wf-out-1314.google.com ([209.85.200.172]:59456) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LwEA2-0003pH-80 for grub-devel@gnu.org; Tue, 21 Apr 2009 07:29:10 -0400 Received: by wf-out-1314.google.com with SMTP id 23so2163878wfg.24 for ; Tue, 21 Apr 2009 04:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=LOZBbF7BYXMO8RjbRe+c4asl0v7AwJqSUU7lprh/t78=; b=bj3NfUwUI178ZstpiN5p824rzqjFuf9qoas0UAXFR9KhN1GpE4wFRgm3OdPQPkTBow yl2NrzhNucU8sCvwjMj3iY6OtyFz+KASLuePtlUzBIRwv1aqtO9Gnkpkttj03k6Jy5Zg 1+H2Y3oGBEKV84QqjMv5UMx7nBZUFnghqhRzg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=iOr9oRREoYVeTblmAokUyF2gzd6q+NLWzAD67aogvPo66hDwWVg0q1rBfP3VldeXBl JqqaYdWTcJmzg3maycBiPR1ZjMS7z2hB5n/3dOQNWoeA5Vu6bQgpumofYhUpDsTw5YY/ zob6PZ59566bmWbZC8fWsMZbnp6xMcscmISzE= MIME-Version: 1.0 Received: by 10.143.41.5 with SMTP id t5mr4789917wfj.134.1240313348781; Tue, 21 Apr 2009 04:29:08 -0700 (PDT) In-Reply-To: References: <48f46e890904200223o4f11e73au5935c15155df4a00@mail.gmail.com> Date: Tue, 21 Apr 2009 21:29:08 +1000 Message-ID: <48f46e890904210429mdad5590we5cc81c1417ad96d@mail.gmail.com> From: Peter Cros To: The development of GRUB 2 Content-Type: multipart/alternative; boundary=001636e8ffc590758704680ef4a0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] gptsync X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2009 11:29:20 -0000 --001636e8ffc590758704680ef4a0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, I have been playing with grub gptsync, on apple intel mac with GUID partitioned 8 GB usb stick, 8 partitions. #1 is the standard fat32 EFI system part for macs. I am comparing with the gptsync utility from linux, or rEFIt gptsync, currently used for macs booting pc-bios bootloader. It is working to allow selection of GPT partions for MBR 2, 3, 4 but some of the numbers look wrong. I have not tried setting flags. grub gptsync is not handling MBR partition table 1 the same way as current linux or refit gptsync, which puts GPT partition 1 (EFI system FAT32) in MBR part1. GPT Partions are (512 byte sectors) Current GPT partition table: # Start LBA End LBA Type 1 40 409639 EFI System (FAT) 2 409640 2395367 Mac OS X HFS+ 3 2395368 4573255 Mac OS X HFS+ 4 4835400 7141399 Mac OS X HFS+ 5 7403544 9965767 Mac OS X HFS+ 6 10227912 13046359 Mac OS X HFS+ 7 13308504 15642623 Mac OS X HFS+ 8 15904768 15949783 Mac OS X HFS+ There seems to be agreement about start and end on MBR table partitions 2 3 4, using grub> gptsync (hd0) 2 3 4. Other bytes differ (type, flags). This is after grub> gptsync (hd0) 2 3 4 (MBR part1 was initially set by linux gptsync) pxw@im81:~$ sudo hexdump -Cn80 -s432 /dev/sdb [sudo] password for pxw: 000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000001c0 02 00 ee 7f 0e 19 01 00 00 00 27 40 06 00 00 7f |..........'@....| 000001d0 0f 19 83 1a 2d 95 28 40 06 00 c0 4c 1e 00 00 1a |....-.(@...L....| 000001e0 2e 95 83 ab 57 1c e8 8c 24 00 60 3b 21 00 00 fc |....W...$.`;!...| 000001f0 59 2c 83 87 63 bc 48 c8 49 00 d0 2f 23 00 55 aa |Y,..c.H.I../#.U.| 00000200 Then as seen in linux gptsync, Current MBR partition table: # A Start LBA End LBA Type 1 1 409639 ee EFI Protective 2 409640 2395367 83 Linux 3 2395368 4573255 83 Linux 4 4835400 7141399 83 Linux Status: MBR table must be updated. Proposed new MBR partition table: # A Start LBA End LBA Type 1 1 409639 ee EFI Protective 2 * 409640 2395367 af Mac OS X HFS+ 3 2395368 4573255 af Mac OS X HFS+ 4 4835400 7141399 af Mac OS X HFS+ May I update the MBR as printed above? [y/N] y Yes pxw@im81:~$ sudo hexdump -Cn80 -s432 /dev/sdb 000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fe |................| 000001c0 ff ff ee fe ff ff 01 00 00 00 27 40 06 00 80 fe |..........'@....| 000001d0 ff ff af fe ff ff 28 40 06 00 c0 4c 1e 00 00 fe |......(@...L....| 000001e0 ff ff af fe ff ff e8 8c 24 00 60 3b 21 00 00 fe |........$.`;!...| 000001f0 ff ff af fe ff ff 48 c8 49 00 d0 2f 23 00 55 aa |......H.I../#.U.| 00000200 -- Cros (pxw) --001636e8ffc590758704680ef4a0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

I have been playing with grub gptsync, on= apple intel mac with GUID partitioned 8 GB usb stick, 8 partitions. #1 is = the standard fat32 EFI system part for macs.

I am = comparing with the gptsync utility from linux, or rEFIt gptsync, currently = used for macs booting pc-bios bootloader.

It is working to allow selection of GPT partions for MB= R 2, 3, 4 but some of the numbers look wrong. I have not tried setting flag= s.

grub gptsync is not handling MBR partition tabl= e 1 the same way as current linux or refit gptsync, which puts GPT partitio= n 1 (EFI system FAT32) in MBR part1.


GPT Partions are
(512 byte sec= tors)
Current GPT partition table:
=A0# =A0 =A0 =A0Star= t LBA =A0 =A0 =A0End LBA =A0Type
=A01 =A0 =A0 =A0 =A0 =A0 =A0 40 = =A0 =A0 =A0 409639 =A0EFI System (FAT)
=A02 =A0 =A0 =A0 =A0 409640 =A0 =A0 =A02395367 =A0Mac OS X HFS+
<= div>=A03 =A0 =A0 =A0 =A02395368 =A0 =A0 =A04573255 =A0Mac OS X HFS+=A04 =A0 =A0 =A0 =A04835400 =A0 =A0 =A07141399 =A0Mac OS X HFS+=A05 =A0 =A0 =A0 =A07403544 =A0 =A0 =A09965767 =A0Mac OS X HFS+
=A06 =A0 =A0 =A0 10227912 =A0 =A0 13046359 =A0Mac OS X HFS+
= =A07 =A0 =A0 =A0 13308504 =A0 =A0 15642623 =A0Mac OS X HFS+
=A08 = =A0 =A0 =A0 15904768 =A0 =A0 15949783 =A0Mac OS X HFS+

=
There seems to be agreement about start and end on MBR table partition= s 2 3 4,=A0using grub> gptsync (hd0) 2 3 4.
Other bytes differ (type, flags).

This is aft= er grub> gptsync (hd0) 2 3 4=A0
(MBR part1 was initially set b= y linux gptsync)

pxw@im81:~$ sudo hexdump -Cn80 -s= 432 /dev/sdb
[sudo] password for pxw:
000001b0 =A000 00 00 00 00 00 00 00= =A000 00 00 00 00 00 00 00 =A0|................|
000001c0 =A002 = 00 ee 7f 0e 19 01 00 =A000 00 27 40 06 00 00 7f =A0|..........'@....|
000001d0 =A00f 19 83 1a 2d 95 28 40 =A006 00 c0 4c 1e 00 00 1a =A0|....-.(@= ...L....|
000001e0 =A02e 95 83 ab 57 1c e8 8c =A024 00 60 3b 21 0= 0 00 fc =A0|....W...$.`;!...|
000001f0 =A059 2c 83 87 63 bc 48 c8= =A049 00 d0 2f 23 00 55 aa =A0|Y,..c.H.I../#.U.|
00000200

Then as seen in linux gptsync,=A0

Current MBR partition table:
=A0# A =A0 = =A0Start LBA =A0 =A0 =A0End LBA =A0Type
=A01 =A0 =A0 =A0 =A0 =A0 = =A0 =A01 =A0 =A0 =A0 409639 =A0ee =A0EFI Protective
=A02 =A0 =A0 =A0 =A0 409640 =A0 =A0 =A02395367 =A083 =A0Linux
=A03 =A0 =A0 =A0 =A02395368 =A0 =A0 =A04573255 =A083 =A0Linux
= =A04 =A0 =A0 =A0 =A04835400 =A0 =A0 =A07141399 =A083 =A0Linux
Status: MBR table must be updated.

Proposed new MBR partition table:
=A0# A =A0 =A0St= art LBA =A0 =A0 =A0End LBA =A0Type
=A01 =A0 =A0 =A0 =A0 =A0 =A0 = =A01 =A0 =A0 =A0 409639 =A0ee =A0EFI Protective
=A02 * =A0 =A0 = =A0 409640 =A0 =A0 =A02395367 =A0af =A0Mac OS X HFS+
=A03 =A0 =A0 =A0 =A02395368 =A0 =A0 =A04573255 =A0af =A0Mac OS X HFS+<= /div>
=A04 =A0 =A0 =A0 =A04835400 =A0 =A0 =A07141399 =A0af =A0Mac OS X = HFS+
May I update the MBR as printed above? [y/N] y
Yes=

pxw@im81:~$ sudo hexdump -Cn80 -s432 /dev/sdb
000001b0 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 fe =A0|...= .............|
000001c0 =A0ff ff ee fe ff ff 01 00 =A000 00 27 40= 06 00 80 fe =A0|..........'@....|
000001d0 =A0ff ff af fe ff= ff 28 40 =A006 00 c0 4c 1e 00 00 fe =A0|......(@...L....|
000001e0 =A0ff ff af fe ff ff e8 8c =A024 00 60 3b 21 00 00 fe =A0|...= .....$.`;!...|
000001f0 =A0ff ff af fe ff ff 48 c8 =A049 00 d0 2f= 23 00 55 aa =A0|......H.I../#.U.|
00000200

<= div>

--=A0
Cros (pxw)


--001636e8ffc590758704680ef4a0--