Skip to content

Fix issue with GRUB defaulting to an old kernel #878

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

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

priteau
Copy link
Member

@priteau priteau commented Jan 17, 2024

On some Rocky Linux 9 deployments, we are seeing GRUB defaulting to the old kernel included in the DIB image, even after newer kernels have been installed. This appears to be related to the presence of Boot Loader Specification (BLS) entries with a machine ID lower in alphabetical order than the current one:

[stack@host ~]$ sudo cat /etc/machine-id
cd3361a338fe47348de9937e51a7a4aa
[stack@host ~]$ sudo ls -l /boot/loader/entries/
total 20
-rw-r--r--. 1 root root 449 Mar 31  2023 104a42359fae41b687caac066397aec2-0-rescue.conf
-rw-r--r--. 1 root root 397 Mar 31  2023 104a42359fae41b687caac066397aec2-5.14.0-162.22.2.el9_1.x86_64.conf
-rw-r--r--  1 root root 446 Jun  9  2023 cd3361a338fe47348de9937e51a7a4aa-0-rescue.conf
-rw-r--r--  1 root root 422 Jun  9  2023 cd3361a338fe47348de9937e51a7a4aa-5.14.0-284.11.1.el9_2.x86_64.conf
-rw-r--r--  1 root root 422 Jan  9 09:40 cd3361a338fe47348de9937e51a7a4aa-5.14.0-284.30.1.el9_2.x86_64.conf

Add a new reset-bls-entries.yml playbook which will rename existing BLS entries using the current machine ID. This should prompt Grub to pick the most recent kernel on next reboot.

@priteau priteau added the bug Something isn't working label Jan 17, 2024
@priteau priteau self-assigned this Jan 17, 2024
@priteau priteau requested a review from a team as a code owner January 17, 2024 09:25
On some Rocky Linux 9 deployments, we are seeing GRUB defaulting to the
old kernel included in the DIB image, even after newer kernels have been
installed. This appears to be related to the presence of Boot Loader
Specification (BLS) entries with a machine ID lower in alphabetical
order than the current one:

    [stack@host ~]$ sudo cat /etc/machine-id
    cd3361a338fe47348de9937e51a7a4aa
    [stack@host ~]$ sudo ls -l /boot/loader/entries/
    total 20
    -rw-r--r--. 1 root root 449 Mar 31  2023 104a42359fae41b687caac066397aec2-0-rescue.conf
    -rw-r--r--. 1 root root 397 Mar 31  2023 104a42359fae41b687caac066397aec2-5.14.0-162.22.2.el9_1.x86_64.conf
    -rw-r--r--  1 root root 446 Jun  9  2023 cd3361a338fe47348de9937e51a7a4aa-0-rescue.conf
    -rw-r--r--  1 root root 422 Jun  9  2023 cd3361a338fe47348de9937e51a7a4aa-5.14.0-284.11.1.el9_2.x86_64.conf
    -rw-r--r--  1 root root 422 Jan  9 09:40 cd3361a338fe47348de9937e51a7a4aa-5.14.0-284.30.1.el9_2.x86_64.conf

Add a new `reset-bls-entries.yml` playbook which will rename existing
BLS entries using the current machine ID. This should prompt Grub to
pick the most recent kernel on next reboot.
Copy link
Member

@cityofships cityofships left a comment

Choose a reason for hiding this comment

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

I've tested this @ Nesi, worked fine.

@priteau
Copy link
Member Author

priteau commented Jan 23, 2024

Thanks @cityofships.

@priteau priteau merged commit b7e87d4 into stackhpc/yoga Jan 23, 2024
@priteau priteau deleted the reset-bls-entries branch January 23, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants