RFE: add support for multiple second stage loaders
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 348
- PR merge metrics
- No merged PRs in 30d
Description
If a distribution wants to support multiple second stage bootloaders, it is hard with the current hardcoded filename (either grub<arch>.efi or the override of DEFAULT_LOADER set at compilation time). Please add support for having multiple second-stage bootloaders installed. The goal is to decouple shim from the second stage bootloader, so that the user can install one or more of the bootloader packages and the new efi binary will be picked up automatically, but at the same time, the bootloader packages don't step on each other's toes and can be updated / installed / removed independently.
I think this could be implemented as a glob or a prefix pattern so it's possible to add new second-stage bootloaders without modifying shim itself. E.g. Fedora could set DEFAULT_LOADERS=fedora-*.efi, and then shim would list all efi binaries present in ESP, and for the ones that match the glob, try them in turn. Or if a glob is too hard to implement, DEFAULT_LOADER_PREFIX=fedora-, and then try to boot anything that starts with the prefix and ends with .efi.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the hardcoded grub.efi name and compile-time DEFAULT_LOADER are used to select a second-stage bootloader. Then investigate EFI binaries present on the ESP and define how matching loaders should be tried independently; done means multiple installed bootloader packages can be installed, updated, and removed without stepping on each other.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100