There appears to be a small bug there. For example - gptsync (hd0) 4 2 3 will write data for GPT partition 4 2 3 to MBR partition table 2 3 4 but also GPT partition 1 to MBR partition 1 (which is actually what happens now for intel mac.) And similarly for other selections will write the next lower gpt partition number to MBR partition 1 slot. I don't think it is compatible with current MBR/GPT hybrid partitioning on intel macs for grub-pc booting.
On Wed, Apr 22, 2009 at 1:10 AM, Vladimir Serbinenko <phco...@gmail.com>wrote: > > > On Tue, Apr 21, 2009 at 1:29 PM, Peter Cros <pxwp...@gmail.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 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) >> >> p...@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 > >> >> p...@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 >> >> > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > > -- Cros (pxw)
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel