[debian-installer/partman-efi] ESP partition detection
(Posting to debian-boot and debian-efi because the topic concerns both
lists. Please reply to debian-boot.)
The script init.d/efi examines each existing partition and detects it as
EFI System Partition (ESP) if it matches the following condition:
or ( filesystem=FAT32 and partition name="EFI System Partition" )
or ( disklabel=MSDOS and partition type ID=ESP )
or ( disklabel=GPT and partition type GUID=ESP )
) and libparted flag "boot" is set
I am puzzled by some of these requirements because AFAICS the UEFI
specification mentions only partition type=ESP and filesystem=FAT,
stating that UEFI implementations may accept FAT partitions even without
the ESP GUID.
1) Why does FAT32 require the name "EFI System Partition" while FAT16
does not ? Such partition name is not mentioned in the UEFI specification.
2) Why is the "boot" flag required ?
In GPT disklabels, the "boot" and "esp" libparted flags are synonyms and
both identify the ESP partition type GUID. So the boot flag check is
redundant with the partition type GUID check.
In MSDOS disklabels, the "boot" libparted flag identifies the
boot/active indicator in the partition entry. The UEFI specification
states that this field is used for legacy boot and shall not be used by
As a result of this requirement, a regular ESP partition with the ESP
type ID but without the boot flag in a MSDOS disklabel is not detected.
Conversely, a FAT16 *DOS or Windows 9x boot partition would be wrongly
detected as ESP.