-
Notifications
You must be signed in to change notification settings - Fork 54
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
Grub refactor and other distros #1858
Grub refactor and other distros #1858
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1858 +/- ##
==========================================
+ Coverage 75.29% 75.97% +0.68%
==========================================
Files 67 66 -1
Lines 6825 6915 +90
==========================================
+ Hits 5139 5254 +115
+ Misses 1315 1290 -25
Partials 371 371 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't (easily) review a PR with 47(!) changed files
@kkaempf alright, orange flavor is finally added too. Now the test matrix is huge and, unfortunately, the macos environment we use is still flaky a bit, hence with such a big matrix is not rare that one or two tests fail. Retrying makes them pass. On the good side tests are easily reproducible on the local environment, hence if there is a non environment related issue we can easily reproduce it without the need of github actions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, ship it 🚀
ce0ad86
to
21d62f5
Compare
Adding blocked label as I think we should sort #1856 first, as the two PR conflict and I do believe it is easier to rebase this PR than the other way round. |
21d62f5
to
a27fd26
Compare
73b41a4
to
8cf2973
Compare
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 /boot/efi/EFI/elemental, 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>
Signed-off-by: David Cassany <dcassany@suse.com>
Signed-off-by: David Cassany <dcassany@suse.com>
Signed-off-by: David Cassany <dcassany@suse.com>
Signed-off-by: David Cassany <dcassany@suse.com>
Signed-off-by: David Cassany <dcassany@suse.com>
…t and efi values respectively Signed-off-by: David Cassany <dcassany@suse.com>
Signed-off-by: David Cassany <dcassany@suse.com>
Signed-off-by: David Cassany <dcassany@suse.com>
Signed-off-by: David Cassany <dcassany@suse.com>
8cf2973
to
8576c3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unreviewable with 52 changed files :-(
This commit adds a new bootloader interface and provides a grub based implementation for it.
The grub implementation is moved to its own bootloader package and the implementation is refactor to not relay on distro detection anymore, but instead it searches the relevant files (efi image, shim, grub modules, etc.) based on path patterns. The search is done by trying to find a file matching the given pattern, first match wins.
In addition, in order to make the implementation even more flexible, the first path where elemental tries to fine bootloader artifacts is an elemental custom path (currently
/usr/lib/elemental/bootloader
), this is giving us a chance to set or copy the bootloader artifacts we want into custom path within the Dockerfile to ensure elemental client will later be capable to find them at install time (see Ubuntu example).Finally the refactor also changes the init command to ensure the initramfs and kernel are set with the appropriate names in init phase. So we are certain init is consistent with the default grub setup.