Skip to content

feat(grubby): provide the /etc/sysconfig/kernel file#17532

Closed
ddstreet wants to merge 1 commit into
microsoft:4.0from
ddstreet:grubby-update-kernel
Closed

feat(grubby): provide the /etc/sysconfig/kernel file#17532
ddstreet wants to merge 1 commit into
microsoft:4.0from
ddstreet:grubby-update-kernel

Conversation

@ddstreet
Copy link
Copy Markdown
Contributor

@ddstreet ddstreet commented May 28, 2026

This file has a setting, UPDATEDEFAULT=, which is used by the kernel-install (aka installkernel) program to determine if the default kernel should be updated to use the newly installed kernel.

This sets UPDATEDEFAULT=yes, so a newly installed kernel will be set as the default kernel (on the next boot); without this, the default kernel will remain set to the current kernel.

Taken from upstream:
https://src.fedoraproject.org/rpms/grubby/c/482a2825c47c4fd28a18beb279a3e826461bf878

Fixes: AB#20392

This file has a setting, UPDATEDEFAULT=, which is used by the
kernel-install (aka installkernel) program to determine if the default
kernel should be updated to use the newly installed kernel.

This sets UPDATEDEFAULT=yes, so a newly installed kernel will be set
as the default kernel (on the next boot); without this, the default
kernel will remain set to the current kernel.

Taken from upstream:
https://src.fedoraproject.org/rpms/grubby/c/482a2825c47c4fd28a18beb279a3e826461bf878

Fixes: AB#20392
Copilot AI review requested due to automatic review settings May 28, 2026 18:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds an /etc/sysconfig/kernel configuration file to the grubby package/component so kernel-install can set defaults consistently.

Changes:

  • Add a kernel.sysconfig file defining UPDATEDEFAULT and DEFAULTKERNEL.
  • Update grubby.spec to ship /etc/sysconfig/kernel as %config(noreplace).
  • Add a grubby component overlay definition (and adjust component indexing/lock fingerprint).

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
specs/g/grubby/kernel.sysconfig Adds the sysconfig file content to be shipped with the RPM.
specs/g/grubby/grubby.spec Adds Source999, installs the sysconfig file, and marks it as config.
locks/grubby.lock Updates input fingerprint to reflect content changes.
base/comps/grubby/kernel.sysconfig Adds the same sysconfig file content for the component overlay system.
base/comps/grubby/grubby.comp.toml Defines overlays to add the sysconfig file and patch the spec.
base/comps/components.toml Removes the components.grubby entry from the central component list.

Comment thread base/comps/grubby/grubby.comp.toml
Comment thread base/comps/grubby/kernel.sysconfig
Comment thread base/comps/grubby/grubby.comp.toml
Comment thread base/comps/grubby/grubby.comp.toml
@ddstreet
Copy link
Copy Markdown
Contributor Author

verified this does fix the kernel default update behavior:

verifying issue exists, on a fresh install of azl4 beta from marketplace:

$ sudo grubby --default-kernel
/boot/vmlinuz-6.18.29-1.1.azl4.x86_64
$ sudo dnf update -y
...(updates kernel)...
$ sudo grubby --default-kernel
/boot/vmlinuz-6.18.29-1.1.azl4.x86_64
$ sudo reboot
...(reboots)...
$ uname -r
6.18.29-1.1.azl4.x86_64

verifying issue fixed, on a fresh install of azl4 beta from marketplace:

(First, scp patched grubby rpm to system)

$ sudo grubby --default-kernel
/boot/vmlinuz-6.18.29-1.1.azl4.x86_64
$ sudo dnf install ./grubby-8.40-87.azl4.x86_64.rpm
$ sudo dnf update -y
...(updates kernel)...
$ sudo grubby --default-kernel
/boot/vmlinuz-6.18.31-1.3.azl4.x86_64
$ sudo reboot
...(reboots)...
$ uname -r
6.18.31-1.3.azl4.x86_64

@ddstreet
Copy link
Copy Markdown
Contributor Author

closing this in favor of updating grubby to f44 version with this change

@ddstreet ddstreet closed this May 28, 2026
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.

2 participants