Note 2: Some BIOSes are even fussier, and perform more checks and refuses to boot from what they think as "invalid" MBR. The thing is, what they consider as "invalid" may in fact be valid MBR partition. If you have this kind of BIOS, then good luck, because you need to manually craft your MBR to make your BIOS believe that it is a valid one.
About bootloaders
Here I will use syslinux because it is the simplest to setup; but it is not the only bootloaders that can do so. Grub2 can definitely do it. Vanilla Grub Legacy (Grub 0.9.7) can't because development stopped long before GPT support was implemented, although there are distro patches (e.g. from Fedora) that make it capable. Grub4Dos - which is a long-running fork of Grub Legacy, doesn't support it yet at the time of writing.
For the following I will assume that your GPT disk is /dev/sda
and your
(soon-to-be) bootable partition is partition 3, that is, /dev/sda3
.
Obviously change all references to /dev/sda
, /dev/sda3
and the partition 3 to your own setup.
I will make the assumption that the partition you want to setup is Linux partition (ext2/ext3/ext4).
If you use sgdisk, type
sgdisk -A 3:set:2 /dev/sda
/dev/sda
.
If you use the interactive gdisk tool instead of sgdisk above:
gdisk /dev/sda
Extra functionality (experts only)
menu by typing "x"
Set attributes
by typing "a"
Legacy BIOS bootable
by typing "2".
mount /dev/sda3 /mnt/data
extlinux -i /mnt/data
extlinux -i /mnt/data/boot
Then please add the usual syslinux.conf configuration to boot your system - location of your kernel, initrd, rootfs, etc.
dd if=/usr/share/syslinux/gptmbr.bin of=/dev/sda bs=440 count=1
To this, you need to use "fdisk". Yes, plain old fdisk.
fdisk
on the disk (fdisk /dev/sda
) and ignore the warnings.
As mentioned above, doing this is actually discouraged, see for example: http://mjg59.dreamwidth.org/8035.html (Matt Garret is the expert on all things UEFI, he is the author of the 'shim' bootloader used by many Linux distros which enables Linux to boot directly on UEFI SecureBoot machines protected by Microsoft keys); but if this is what it takes for your system to boot, then so be it.
Installing a bootloader also means that ALL your previously installed operating system will not boot unless you configure the new bootloader to boot them. If you don't understand the consequences of the actions described in earlier, you'd better stay away from doing this altogether. You have been warned!
Some software (including gdisk) actually offers another type of protective MBR called "hybrid MBR", in this case, the GPT partition definitions are copied and mirrored into the MBR partition definitions - if you have 3 partitions in GPT you will have 4 partitions in MBR (3 GPT + original protective).
This is obviously not perfect since the reason why we want to have GPT in the first place is because MBR cannot record the entire disk capacity, in addition, this method is highly discouraged. The reason why is documented here: http://www.rodsbooks.com/gdisk/hybrid.html by the author of gptfdisk, no less.
Originally posted here: Booting GPT disk in BIOS systems using Syslinux.