You are not logged in.

#1 2011-07-03 16:27:24

LeafStorm
Member
From: North Carolina
Registered: 2009-05-20
Posts: 51
Website

Booting Arch in GPT mode on a GPT/MBR hybrid disk

Hello, everyone. I am soon to be the owner of a shiny new Macbook Pro, on which I plan to install Mac OS X Lion, Windows 7, Arch Linux, and possibly later Fedora, elementary, or some other form of Linux. I have done a bunch of research on UEFI, BIOS, GPT, and MBR, and I have determined that unless Apple magically upgraded to UEFI 2.0 while I wasn't looking, the best thing to do would be to boot all the non-Mac OS operating systems under BIOS compatibility mode.

Of course, I then run into problems with partitioning. My plan thus far is to have a partition layout that looks like this from Arch Linux's point of view:

  • sda1: EFI system partition (FAT32)

  • sda2: Mac OS X partition (HFS+ journaled), /mac

  • sda3: Windows 7 partition (NTFS), /windows

  • sda4: Common partition (maybe NTFS), /common

  • sda5: Arch Linux boot partition (ext2), /boot

  • sda6: Arch Linux root partition (ext4), /

  • sda7: Linux swap partition (swap)

  • sdamorethan7: Theoretical future Linuces

It will use the hybrid GPT/MBR system preferred by Boot Camp, with sda1-4 included in the MBR. (I checked the gptsync source code, and as far as I can tell it will only sync the first four partitions, but not refuse to sync the MBR if there are more than four.)

From what I understand, GRUB2 is capable of booting in BIOS emulation mode from a GPT disk. The GPT wiki page says that all I need to do is load the proper GRUB module for GPT support, and GRUB will use the GPT partition tables. Of course, that leads to a few questions.

First, will the grub-probe software still load the GPT module, and will the kernel still activate in GPT mode, if there is a hybrid MBR present (i.e. will the hybrid MBR distract them from booting in GPT mode)? If not, is there a way to force them to use GPT over the hybrid MBR?

Second (and this isn't directly related to the first question), will rEFIt search for BIOS-based bootloaders on partitions not included in the MBR? (If not, I should be able to work around it by setting up a GRUB on sda4 that will chainload to sda5.)


Thanks,
Matthew Frazier

Offline

#2 2011-07-05 19:34:35

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: Booting Arch in GPT mode on a GPT/MBR hybrid disk

You might want to try http://rodsbooks.com/bios2uefi/ (by the author of GPT fdisk aka gdisk). Even after that if you want to go with Hybrid MBR see http://rodsbooks.com/gdisk/hybrid.html . Use gdisk to create the hybrid MBR - more flexible compared to gptsync.

In case of hybrid MBR, Linux and Mac OS X will exclusively use only the GPT table and ignore the MBR table completely. GRUB2 will also use the GPT table alone unless it is specifically instructed (at runtime) to try the MBR table.

But Windows will exclusively use only the MBR table and ignore the GPT table. If you plan to try the UEFI DUET method of booting Windows x64, checkout https://gitorious.org/tianocore_uefi_du … OS_to_UEFI . https://gitorious.org/tianocore_uefi_du … I_boot_USB might also help.

Last edited by skodabenz (2011-07-05 19:36:19)


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#3 2011-07-11 20:34:20

LeafStorm
Member
From: North Carolina
Registered: 2009-05-20
Posts: 51
Website

Re: Booting Arch in GPT mode on a GPT/MBR hybrid disk

skodabenz wrote:

In case of hybrid MBR, Linux and Mac OS X will exclusively use only the GPT table and ignore the MBR table completely. GRUB2 will also use the GPT table alone unless it is specifically instructed (at runtime) to try the MBR table.

Thanks for the answer. Also, thanks for the links - the one about hybrid MBRs and gdisk was interesting (I will probably use that instead of gptsync, as you suggested) but I don't think I'll try to use the BIOS to UEFI conversion...too much extra complication for little tangible benefit.


Thanks,
Matthew Frazier

Offline

Board footer

Powered by FluxBB