Is it possible to boot Linux from a GPT disk on a BIOS system?

I have an AMI BIOS computer [Asus EB1501P] with a Seagate ST9250315AS 250GB HDD.

Is it possible to boot Linux from a GPT disk on such a BIOS system?


Solution 1:

The BIOS generally doesn't care anything about your hard drives1. It simply loads the MBR and transfer control to the boot loader in MBR. Therefore technically it'll be possible to boot a GPT drive in BIOS mode, because the GPT drive still has a protective MBR at the beginning. You just need a bootloader that supports GPT disks (such as Grub and many other Linux bootloaders)

However, here a small problem arises. On MBR drives the boot loaders often cheat a bit by storing a part of them in the next sectors called "MBR gap", "boot track", or "embedding area" which are often left empty by disk partitioning tools. On a GPT disk the sectors right after the MBR are GPT data structures, hence can't be used for that purpose and you need to create a small BIOS Boot Partition for Grub to store its data

On a BIOS/GPT configuration, a BIOS boot partition is required. GRUB embeds its core.img into this partition.

Note:

  • Before attempting this method keep in mind that not all systems will be able to support this partitioning scheme. Read more on GUID partition tables.
  • This additional partition is only needed on a GRUB, BIOS/GPT partitioning scheme. Previously, for a GRUB, BIOS/MBR partitioning scheme, GRUB used the Post-MBR gap for the embedding the core.img). GRUB for GPT, however, does not use the Post-GPT gap to conform to GPT specifications that require 1_megabyte/2048_sector disk boundaries.
  • For UEFI systems this extra partition is not required, since no embedding of boot sectors takes place in that case. However, UEFI systems still require an EFI system partition.

Create a mebibyte partition (+1M with fdisk or gdisk) on the disk with no file system and with partition type GUID 21686148-6449-6E6F-744E-656564454649.

  • Select partition type BIOS boot for fdisk.
  • Select partition type code ef02 for gdisk.
  • For parted set/activate the flag bios_grub on the partition.

GUID Partition Table (GPT) specific instructions

Grub also supports hard coding the sector that contains the next stage so it can boot without a post-MBR gap or BIOS boot partition, but that's fragile because you need to update Grub after every OS update. Therefore this isn't recommended

For more information you can read

  • How grub2 works on a MBR partitioned disk and GPT partitioned disk?
  • https://wiki.archlinux.org/index.php/partitioning#Choosing_between_GPT_and_MBR
  • Legacy BIOS Issues with GPT
  • Booting from GPT
  • Grub BIOS installation official documentation

Another way is to convert the GPT drive back to MBR if your HDD is not too big. In fact it's possible to have MBR disks above 2 TB, upto ~233 sectors (i.e. 4 TB and 16 TB for disks with 512-byte and 4096-byte sector respectively) with a big partition lasting from just before the half disk margin. There are multiple tools to do the conversion without loss of data like gdisk, MiniTool Partition Wizard, AOMEI Partition Assistant, EaseUS Partition Master... (I'm not affiliated with any of them).

Since your HDD is just 250 GB so it'll work fine in MBR. But using GPT is much safer because it has checksum and a backup table at the end, although it's a lot trickier if you dual boot Windows or some other OSes that are BIOS GPT unfriendly


1There are some buggy BIOSes that eagerly unnecessarily do things they aren't supposed to do like checking the MBR signature or the active boot flag and refuse to boot on such drives

Solution 2:

Theoretically, GPT should work with BIOS. However, there are occasional incompatibilities. These are generally in the nature of bugs or idiosyncrasies of specific hardware, so the information tends to be reports of exceptions rather than what you find in documentation of BIOS and GPT.

All of the possibilities are too broad to cover here, but see, for example, https://www.rodsbooks.com/gdisk/bios.html, which also discusses some potential solutions if you experience problems. The options depend on whether you want to stick with BIOS or switch to EFI/UEFI if your motherboard supports it.

If you add your motherboard, computer, and hard drive models to the question, someone who has tried it on an equivalent system and sees your question may be able to describe their experience.