[parted-devel] [PATCH] GPT -> MBR synchronization

Alexander Graf agraf at suse.de
Tue Jul 29 17:07:53 UTC 2008


On Jul 29, 2008, at 6:49 PM, H. Peter Anvin wrote:

> Alexander Graf wrote:
>> Hi,
>> pretty much since Macs started a hybrid GPT/MBR approach there were  
>> several attempts to get to a solution on using GPT on BIOS-based  
>> computers. Unfortunately up to today I know of none that actually  
>> made it somewhere except for the manual Mac syncing approach.
>> So my approach is trying to go the easiest way I could think of:  
>> always sync. Instead of writing a fake MBR, when this code is  
>> enabled, it tries to construct primary MBR entries from the first  
>> partitions it finds in the GPT. This means, that as long as the  
>> partition we want to boot from is within the first four partitions,  
>> everything will be fine.
>> This enables a user that is aware of this restriction to have a  
>> fully working hybrid GPT/MBR setup, enabling him to boot without  
>> much intervention on an Intel Mac and with disks >2TB.
>
> I would think a better idea would be to sync the active (bootable)  
> partition.  Assuming it is the first 3 (or 4) partitions seems a bit  
> of a lose.

While this would work for most Linux systems and other OSs that are  
GPT-aware, it fails miserably when you try to bring Windows into the  
game.

Imagine the following Scenario:

I have a Mac. This Mac has 4 partitions on it:

1. EFI driver partition
2. Mac OS X
3. Windows
4. Linux

When you did the GPT->MBR sync, Linux was the active partition and  
thus the only one being in sync on the MBR. How do you boot Windows?

Another problem would be that even if Windows would've been the active  
partition at that time and we forget all other points against that,  
you wouldn't be able to access the Linux or Mac OS X partition within  
Windows, assuming it's not capable of using the GPT properly (which at  
least the Windows XP I last used was not).

So basically it's not a good idea to sync only the active partition.

Alex



More information about the parted-devel mailing list