MBR vs. GPT and BIOS vs. UEFI

GRUB & Multibooting

Chapter 5 · MBR vs. GPT and BIOS vs. UEFI

grub1-1 previewed this distinction just enough to make sense of everything since. This is the chapter every dual-boot scenario in this course actually depends on — the full structural difference between MBR and GPT, and between BIOS and UEFI, in enough depth to explain the real failures those combinations produce.

MBR — The Legacy Partition Table

The Master Boot Record lives in the disk's first 512-byte sector: 446 bytes for boot code (grub1-2's own boot.img), 64 bytes for the partition table itself — four 16-byte entries, no more — and 2 bytes for a boot signature. Exactly four primary partitions is a hard limit baked directly into that 64-byte structure, not a soft recommendation. The historical workaround — converting one primary slot into an "extended" partition that holds further logical partitions — exists purely to route around this. 32-bit sector addressing caps a usable disk at roughly 2TiB, a genuine ceiling MBR cannot exceed.

GPT — The Modern Partition Table

GPT stores partition information in a proper table structure rather than squeezing it into 64 bytes, using 64-bit addressing — no meaningful size limit for the foreseeable future — and supports up to 128 partitions by default, with no extended/logical workaround needed. Genuinely more resilient, too: GPT keeps a full backup copy of its own partition table at the end of the disk, plus checksums, rather than MBR's single, unprotected copy sitting at the very start. And every GPT disk carries a protective MBR at sector 0 — a deliberate dummy MBR entry, present specifically so older tools that only understand MBR don't mistake a GPT disk for empty space and overwrite it.

BIOS vs. UEFI — Revisited in Full

UEFI is, in real terms, its own small, standardized pre-OS operating environment. It can run programs — drivers, bootloaders — directly from a real FAT filesystem, and it maintains its own persistent, NVRAM-stored list of boot entries (viewable and editable with efibootmgr), independent of any disk's own partition table. BIOS has none of this: no persistent boot-entry storage of its own, no native filesystem reading — exactly why GRUB needs the staged bootstrap grub1-2 described, and exactly why that bootstrap only exists on BIOS systems in the first place.

Which Combinations Actually Work

CombinationStatus
BIOS + MBRThe traditional, natural pairing
UEFI + GPTThe modern, recommended pairing
BIOS + GPTPossible via a hybrid/compatibility setup — real, but not the clean path
UEFI + MBRPossible via CSM (Compatibility Support Module) — again real, but a frequent source of confusing edge cases

This is the precise, technical version of grub1-1's own warn-box: those off-diagonal combinations are where mismatched-boot-mode confusion genuinely originates.

Secure Boot — Briefly

A UEFI-specific feature: firmware refuses to execute any bootloader that isn't cryptographically signed by a trusted key. Some Linux distributions ship a GRUB build signed via a small intermediary ("shim") layer specifically to work with Secure Boot out of the box; others require disabling Secure Boot, or manually enrolling a key, before their own bootloader will run at all. A genuinely practical concern for grub1-6/grub1-7's own dual-boot scenarios — named here deliberately briefly, not covered exhaustively.

Revisiting pc_build_11's Own Material

pc_build_11 covered BIOS/UEFI at the hardware level — how to enter your firmware's own settings screen while building a PC. This chapter goes deeper on a genuinely different question that chapter never addressed: not "how do I access these settings," but "what is the actual structural difference in how each firmware model finds and executes a bootloader in the first place."

Check a real disk's own partition table type
sudo parted -l or lsblk -o NAME,PTTYPE reports whether a disk is currently MBR or GPT, right now — turning this chapter's conceptual material into something directly checkable on a real system.
Converting between MBR and GPT is destructive to the partition table
Tools exist to convert a disk's partition table type somewhat safely (gdisk's own conversion mode, for one) — but this remains a genuinely risky operation on the partition table itself, and backups matter before ever attempting it. Not something to experiment with on a disk holding data you actually care about.

Hands-On Exercises

Exercise 1

Explain, using MBR's own 64-byte partition table structure, exactly why it can hold only four primary partitions, and what the historical extended/logical partition workaround actually does.

📄 View solution
Exercise 2

Explain what a GPT disk's own "protective MBR" is actually protecting against, and why it's placed at sector 0 rather than somewhere else on the disk.

📄 View solution
Exercise 3

A system is set to boot in UEFI mode, but its disk is partitioned as MBR. Using this chapter's own "which combinations actually work" table, explain what's technically happening here and why it's a real source of confusing edge cases rather than a clean setup.

📄 View solution

Chapter 5 Quick Reference

  • MBR — 512-byte first sector, 4 primary partitions max, ~2TiB size limit, single unprotected partition-table copy
  • GPT — a real table structure, up to 128 partitions, no practical size limit, a backup copy plus checksums, and a protective MBR for compatibility
  • UEFI is its own small pre-OS environment — reads a real filesystem, keeps persistent NVRAM boot entries; BIOS has none of this, which is exactly why GRUB needs its own staged bootstrap on BIOS systems
  • BIOS+MBR and UEFI+GPT are the clean pairings; BIOS+GPT and UEFI+MBR are real but genuinely confusing edge cases
  • Secure Boot (UEFI-only) requires a signed bootloader — a real, practical consideration for the dual-boot chapters ahead
  • parted -l / lsblk -o NAME,PTTYPE — check a real disk's own partition table type
  • Converting a disk between MBR and GPT is destructive to the partition table — never attempt without a backup