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

Fixes #38232 - Fix GRUB2 loader commands for Debian/Ubuntu #10455

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

jloeser
Copy link

@jloeser jloeser commented Feb 21, 2025

Back in time, GRUB2 is using linux and initrd loader commands to load the kernel and initrd into ram on legacy BIOS. Later, linuxefi and initrdefi loader commands have been added to do the same on UEFI platforms as some kind of interim solution. These out-of-tree patches have been added by the vendors.

First vendors 1 started now to drop patches for linuxefi/initrdefi loader commands support, linux/initrd of course also work under UEFI then.

Thus, we need to adapt preseed templates to render correct templates with supported loader commands.

@jloeser
Copy link
Author

jloeser commented Feb 21, 2025

Supersedes #10430

efi_suffix = 'efi'
os_major = @host.operatingsystem.major.to_i

if (os_major > 12 && os_major < 24)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include an OS name check like in the other file because this will be incorrect for Debian 13.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, so you're referring to Ubuntu 12.04. That makes a lot more sense.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stejskalleos mind taking the final look?

@stejskalleos stejskalleos self-assigned this Feb 25, 2025
Copy link
Contributor

@stejskalleos stejskalleos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍏 LGTM

@stejskalleos
Copy link
Contributor

Cannot merge due to failed CI jobs. @jloeser can you please fix the commit message & rebase over the latest develop? If it will be green, I'll merge it.

Back in time, GRUB2 is using `linux` and `initrd` loader commands to
load the kernel and initrd into ram on legacy BIOS. Later, `linuxefi`
and `initrdefi` loader commands have been added to do the same on UEFI
platforms as some kind of interim solution. These out-of-tree patches
have been added by the vendors.

First vendors [1] started now to drop patches for `linuxefi`/`initrdefi`
loader commands support, `linux`/`initrd` of course also work under UEFI
then.

Thus, we need to adapt preseed templates to render correct templates
with supported loader commands.

[1]:https://salsa.debian.org/grub-team/grub/-/commit/5cf01c9d98bda554ac2460a6e68e34743a19328f
@jloeser jloeser force-pushed the 38232-fix-grub-loader-commands branch from 1b74a44 to 1b8bca4 Compare February 25, 2025 09:56
@jloeser jloeser changed the title Fix GRUB2 loader commands for Debian/Ubuntu Fixes #38232 - Fix GRUB2 loader commands for Debian/Ubuntu Feb 25, 2025
@ekohl ekohl merged commit 84a54dc into theforeman:develop Feb 25, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants