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)

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

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

Reply via email to