Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor grub as a bootloader interface #1867

Merged

Conversation

davidcassany
Copy link
Contributor

This commit moves grub logic into its own bootloader interface.

In addition it adds helper methods to find EFI binaries, kernel and initrd based on patterns. No longer a distro detection is required.

It also sets an elemental criteria for those bootloader files. In fact first place to look at is /usr/lib/elemental/bootloader, which gives a chance within the OS Dockerfile to prepare EFI binaries if default distro paths are not matching any of the default Elemental patterns.

Kernel and initrd symlinks as /boot/vmlinuz and /boot/initrd are also created within the init command. This gives at build time more confidence that the kernel and initrd are set consistently with Elemental expectations.

As part of the refactor BIOS firmware and MSDOS partition tables support is finally dropped.

This commit moves grub logic into its own bootloader interface.

In addition it adds helper methods to find EFI binaries, kernel and
initrd based on patterns. No longer a distro detection is required.

It also sets an elemental criteria for those bootloader files. In fact
first place to look at is /usr/lib/elemental/bootloader, which gives a chance
within the OS Dockerfile to prepare EFI binaries if default distro
paths are not matching any of the default Elemental patterns.

Kernel and initrd symlinks as /boot/vmlinuz and /boot/initrd are also
created within the init command. This gives at build time more
confidence that the kernel and initrd are set consistently with
Elemental expectations.

As part of the refactor BIOS firmware and MSDOS partition tables support
is finally dropped.

Signed-off-by: David Cassany <dcassany@suse.com>
@davidcassany davidcassany requested a review from a team as a code owner November 30, 2023 11:17
@davidcassany davidcassany self-assigned this Nov 30, 2023
@davidcassany davidcassany merged commit c786f64 into rancher:main Nov 30, 2023
14 checks passed
@davidcassany davidcassany deleted the grub_refactor_to_an_interface branch November 30, 2023 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants