Aside from the proximate bug in gptsync.patch, there are two reasons I
think this shouldn't have become an issue in the first place. I'd
appreciate any thoughts.


1. Not all partition types should go in the hybrid MBR

The hybrid MBR exists for just two reasons:
i.  So non-GPT-aware OSes can access GPT partitions
ii. So BIOSes/bootloaders that use the MBR exclusively can jump to the 
Partition Boot Record of GPT partitions, for booting.

Neither of these uses are relevant to the grub BIOS Boot Partition. It's
just raw code/data, there's no reason for a non-GPT-aware OS to touch
it. And no foreign bootloader should ever jump directly to it, only grub
should do so, and grub doesn't need the MBR to find it. Other partition
types, such as Linux Swap, also have no use in a hybrid-MBR.

Parted's gptsync should therefore omit BBP and Linux Swap partitions
from the hybrid-MBR.


2. Ubuntu's installer should use an EFI System Partition on GPT

Although it's not mandatory, many OSes and tools expect a GPT partition
table to begin with an EFI System Partition. The elilo bootloader uses
it for booting Linux. Mac OS X's disk utility and installer create an
ESP on every GPT disk they format, and the OS can't do firmware updates
without one. The rEFIt bootloader is often installed in the ESP. I'm not
sure what Windows does, but MS's docs recommend that an ESP comes first
in the GPT and MBR.

Ubuntu's installer currently does not create such an ESP on a clean GPT
disk. Instead, to satisfy the Linux kernel's GPT checks, it assigns to
the BIOS Boot Partition the MBR ID for a protective EFI partition, 0xEE.
(See https://bugs.launchpad.net/ubuntu/+source/partman-auto/+bug/538536
)

I don't think this is the right solution. If later another MBR/GPT-
syncing tool (rEFIt, gdisk) is used, it will not give the BBP the MBR ID
0xEE, and booting Linux will fail. Other OSes may not install without an
ESP, or may be otherwise unhappy.

Partman-auto should therefore put an ESP at the start of a GPT disk when
possible. An example partition layout looks entirely reasonable:

GPT
1. EFI System Partition
2. BIOS Boot Partition
3. Linux root (ext4)
4. Linux swap

Hybrid MBR
1. EFI protective partition
2. Linux root (ext4)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/757201

Title:
  Overlapping partitions created on Apple GPT

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to