Details
Details
- Reviewers
emaste markj - Commits
- rG54d0ae979d95: gpart.8: add entry for xbootldr partition type
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I tried to capture the sense of the specification, rather than specific (Linux/systemd) usage. Please double check it.
Again: https://uapi-group.org/specifications/specs/boot_loader_specification/
Comment Actions
You might put a link to the specification in the SEE ALSO section.
| lib/geom/part/gpart.8 | ||
|---|---|---|
| 1047 | From reading the spec it seems one can have an xbootldr partition without an ESP, so I'm not sure that "secondary to the EFI system partition" is totally accurate, but the spec is not very straightforward. | |
Comment Actions
Based on this:
An installer for an operating system should use this logic when selecting or creating partitions:
- If a boot partition (in case of MBR) or an XBOOTLDR partition (in case of GPT) already exists it should be used as $BOOT and used as primary location to place boot loader menu resources in.
- Otherwise, if on GPT and an ESP is found and it is large enough (let’s say at least 1G) it should be used as $BOOT and used as primary location to place boot loader menu resources in.
- Otherwise, if on GPT and neither XBOOTLDR nor ESP exist, an ESP should be created of the appropriate size and be used as $BOOT, and used as primary location to place boot loader menu resources in.
- Otherwise, a boot partition (in case of MBR) or XBOOTLDR partition (in case of GPT) should be created of an appropriate size, and be used as $BOOT, and used as primary location to place boot loader menu resources in.
I think the intent is essentially "Use or create a large-enough ESP if possible, otherwise add XBOOTLDR in addition to ESP".