From 773848500ed50552c8d8c4a791b22a308b2a6c36 Mon Sep 17 00:00:00 2001 From: Marta Lewandowska Date: Thu, 23 Jul 2026 11:15:02 +0200 Subject: [PATCH] Fix for leapp / image mode ffffffff When manipulating grubby entries with machine-id, if using an image with improper BLS entry starting with ffffffff, grubby ends up not touching anything, so fix by falling back to old behavior if nothing matches machine-id. Signed-off-by: Marta Lewandowska --- grubby-bls | 11 +++++++++++ grubby.spec | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/grubby-bls b/grubby-bls index 7abcd68..2dd51f2 100755 --- a/grubby-bls +++ b/grubby-bls @@ -94,6 +94,17 @@ get_bls_values() { echo "${bls}" done | /usr/libexec/grubby/rpm-sort -c rpmnvrcmp 2>/dev/null | tac)) || : + if [[ -z ${files} ]]; then + files=($(for bls in ${blsdir}/*.conf ; do + if ! [[ -e "${bls}" ]] ; then + continue + fi + bls="${bls%.conf}" + bls="${bls##*/}" + echo "${bls}" + done | /usr/libexec/grubby/rpm-sort -c rpmnvrcmp 2>/dev/null | tac)) || : + fi + for bls in "${files[@]}" ; do blspath="${blsdir}/${bls}.conf" bls_file[$count]="${blspath}" diff --git a/grubby.spec b/grubby.spec index 430231e..a35583a 100644 --- a/grubby.spec +++ b/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 50%{?dist} +Release: 51%{?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 +* Thu Jul 23 2026 Marta Lewandowska - 8.40-51 +- Have grubby only manipulate relevant entries, fallback if empty +- Resolves: #RHEL-132931 + * Fri Jul 03 2026 Marta Lewandowska - 8.40-50 - Have grubby only manipulate and display relevant entries - Resolves: #RHEL-132931