Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LwHcP-0005YJ-H4 for mharc-grub-devel@gnu.org; Tue, 21 Apr 2009 11:10:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwHcO-0005YD-GV for grub-devel@gnu.org; Tue, 21 Apr 2009 11:10:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwHcJ-0005Xy-G5 for grub-devel@gnu.org; Tue, 21 Apr 2009 11:10:39 -0400 Received: from [199.232.76.173] (port=53084 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwHcJ-0005Xv-B2 for grub-devel@gnu.org; Tue, 21 Apr 2009 11:10:35 -0400 Received: from mail-ew0-f160.google.com ([209.85.219.160]:43569) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LwHcI-0002hM-GI for grub-devel@gnu.org; Tue, 21 Apr 2009 11:10:35 -0400 Received: by ewy4 with SMTP id 4so2340669ewy.42 for ; Tue, 21 Apr 2009 08:10:32 -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=hqkqb2Q4htqWjboqEDQxaTnxM4GduYGC0Tzmi9rqRyY=; b=oMAPEOgjUv/9trLpYolxZ2tSgVsLHYnAGUZCG75thq4nFo225UC5pZ25YPd120N06M 36yXGVxfBs7/8umRlHf8Iyxh2xW8K8Cv6w8Bq+9Je5jjuH0ppBqCoAzHUv8eWtvLckcu Y/e4wECDb1fx5i5DkIKKETBnHvjyydGfkxYGA= 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=CUgkn7EHRd0o5LNDgUx3waAAOkES+7/6ZOOWl39LeMBxYVqHveO6VIThi7Uq56WggK RN5zsBdvSkYKUD9bVHjZmzq9TWWeyZPEvJydz6PXIGswsPQd+kqYaEcB72QDJJYi9cjU u9cuFp4ifsDFPxNHCC7uYoc8mu8PV9dDLMlx4= MIME-Version: 1.0 Received: by 10.210.141.17 with SMTP id o17mr5060655ebd.98.1240326632746; Tue, 21 Apr 2009 08:10:32 -0700 (PDT) In-Reply-To: <48f46e890904210429mdad5590we5cc81c1417ad96d@mail.gmail.com> References: <48f46e890904200223o4f11e73au5935c15155df4a00@mail.gmail.com> <48f46e890904210429mdad5590we5cc81c1417ad96d@mail.gmail.com> Date: Tue, 21 Apr 2009 17:10:32 +0200 Message-ID: From: Vladimir Serbinenko To: The development of GRUB 2 Content-Type: multipart/alternative; boundary=0015174bf0f859ae2d0468120cc9 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 15:10:40 -0000 --0015174bf0f859ae2d0468120cc9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Tue, Apr 21, 2009 at 1:29 PM, Peter Cros wrote: > 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. > I don't understand what you mean. I will not do any special treatment for EFI system partition. As far as I'm concerned it's just a partition. I don't think it's a problem since user can ask which partitions to put in MBR > > > 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 > Here there are 2 differences. First partition type for hfs+ isn't autodetected, I will fix this, just I thought it ws unnecessary AFAIK every OS which understands HFS+ understands GPT. The second thing is that none of partiion is active. Here you have just to tell which partition is active. You can have the same behavior as OSX gptsync with command gptsync hd0 2+0xaf 3-0xaf 4-0xaf Once I add hfs+ autodetect it will be enough to do gptsync hd0 2+ 3 4 > > 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) > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > > --0015174bf0f859ae2d0468120cc9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Tue, Apr 21, 2009 at 1:29 PM, Peter C= ros <pxwpxw8@gmai= l.com> wrote:
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.
I don't understand what you mean.=A0 I wil= l not do any special treatment for EFI system partition. As far as I'm = concerned it's just a partition. I don't think it's a problem s= ince user can ask which partitions to put in MBR


GPT Partions are
(512 byte sectors)
Current GPT partition table:
=A0# =A0 =A0 =A0Start 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=
Here there are 2 differences. First partition type for hfs+ isn't autod= etected, I will fix this, just I thought it ws unnecessary AFAIK every OS w= hich understands HFS+ understands GPT. The second thing is that none of par= tiion is active. Here you have just to tell which partition is active. You = can have the same behavior as OSX gptsync with command
gptsync hd0 2+0xaf 3-0xaf 4-0xaf
Once I add hfs+ autodetect it will be e= nough to do
gptsync hd0 2+ 3 4

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)



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


--0015174bf0f859ae2d0468120cc9--