efi_partition(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– efi_partition(9) β€” scan for GPT partitions πŸ’–

Welcome to the efi_partition(9) page from the Kernel API Manual, bestie πŸ’…βœ¨ This one is all about scanning for GPT partitions, and it is lowkey iconic.


🌸 NAME 🌸

efi_partition β€” scan for GPT partitions πŸ¦‹


✨ SYNOPSIS ✨

int efi_partition (struct parsed_partitions *state );

πŸŽ€ ARGUMENTS πŸŽ€

  • state β€” disk parsed partitions 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea: this gets called from check.c. If the disk contains GPT partitions, it sets up partition entries in the kernel. Periodt πŸ’…

If the first block on the disk is a legacy MBR, it will get handled by msdos_partition. If it's a Protective MBR, we'll handle it here. No cap.

We do not create a Linux partition for GPT, but only for the actual data partitions. That part is important, bestie πŸŽ€


πŸ’… RETURN πŸ’…

  • -1 β€” if unable to read the partition table 😭
  • 0 β€” if this isn't our partition table πŸ™ˆ
  • 1 β€” if successful πŸŽ‰

πŸ”₯ SEE ALSO πŸ”₯

Kernel file: ./block/partitions/efi.c πŸ‘‘

Also go peek at these icon friends:


xoxo from efi_partition(9) πŸ’– β€” source/version ./block/partitions, date October 2026 πŸŽ€

πŸ“¦ where this page comes from