From dda97ca5d79ef0e02618f9c915d4425032141112 Mon Sep 17 00:00:00 2001 From: Marta Lewandowska Date: Fri, 3 Jul 2026 15:30:34 +0200 Subject: [PATCH] Only let grubby manipulate machine-id entries On various clouds, systems may be built from snapshots from different machines. The result is BLS entries from the old system that do not correspond to anything on the new system. When grubby is used to sort or update or set a particular entry as the default, it may set too high an index for the entry, which then fails to boot. Use the machine-id to only list and manipulate entries that correspond to the machine. --- grubby-bls | 2 +- grubby.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/grubby-bls b/grubby-bls index 07df5c8..7abcd68 100755 --- a/grubby-bls +++ b/grubby-bls @@ -85,7 +85,7 @@ get_bls_values() { count=0 local -a files local IFS=$'\n' - files=($(for bls in ${blsdir}/*.conf ; do + files=($(for bls in ${blsdir}/${MACHINE_ID}*.conf ; do if ! [[ -e "${bls}" ]] ; then continue fi diff --git a/grubby.spec b/grubby.spec index 878b99d..430231e 100644 --- a/grubby.spec +++ b/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 49%{?dist} +Release: 50%{?dist} Summary: Command line tool for updating BootLoaderSpec files License: GPLv2+ URL: https://github.com/rhinstaller/grubby @@ -169,6 +169,10 @@ current boot environment. %{_mandir}/man8/*.8* %changelog +* Fri Jul 03 2026 Marta Lewandowska - 8.40-50 +- Have grubby only manipulate and display relevant entries +- Resolves: #RHEL-132931 + * Wed Jan 10 2024 Marta Lewandowska - 8.40-49 - Do not overwrite all vars that start with GRUB_CMDLINE_LINUX - Resolves: #RHEL-12853