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

Handle missing GRUB_CMDLINE_LINUX_DEFAULT variable #19

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

priteau
Copy link
Member

@priteau priteau commented Feb 4, 2024

If GRUB_CMDLINE_LINUX_DEFAULT is unset in /etc/default/grub, initialise it from GRUB_CMDLINE_LINUX. We write back the updated kernel command line as GRUB_CMDLINE_LINUX_DEFAULT, the intent being to only apply to
normal (non-rescue) boots. However, on RedHat 9.x, the grubby command that runs next still updates GRUB_CMDLINE_LINUX.

Fixes #18.

@priteau priteau requested a review from jovial February 4, 2024 15:53
@priteau priteau self-assigned this Feb 4, 2024
@priteau priteau requested a review from a team as a code owner February 4, 2024 15:53
@priteau priteau marked this pull request as draft February 5, 2024 10:30
@priteau priteau force-pushed the missing-grub-default-cmdline branch 2 times, most recently from 9b2d640 to c98b6c2 Compare September 26, 2024 08:45
@priteau priteau requested a review from technowhizz September 26, 2024 08:51
@priteau priteau marked this pull request as ready for review September 26, 2024 08:51
Copy link

@technowhizz technowhizz left a comment

Choose a reason for hiding this comment

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

lgtm

@priteau priteau marked this pull request as draft September 26, 2024 10:13
@priteau priteau marked this pull request as ready for review September 26, 2024 10:35
If GRUB_CMDLINE_LINUX_DEFAULT is unset in /etc/default/grub, initialise
it from GRUB_CMDLINE_LINUX. We write back the updated kernel command
line as GRUB_CMDLINE_LINUX_DEFAULT, the intent being to only apply to
normal (non-rescue) boots. However, on RedHat 9.x, the grubby command
that runs next still updates GRUB_CMDLINE_LINUX.

Fixes #18.
@priteau priteau force-pushed the missing-grub-default-cmdline branch 2 times, most recently from 866fa7e to e3620af Compare September 26, 2024 10:52
@priteau priteau merged commit cb03c85 into main Sep 26, 2024
4 checks passed
@priteau priteau deleted the missing-grub-default-cmdline branch September 26, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

grubcmdline generates incorrect kernel parameters if GRUB_CMDLINE_DEFAULT is missing
3 participants