From 39b6e49572b24f06751922d31250c808e4c61300 Mon Sep 17 00:00:00 2001 From: AlmaLinux RelEng Bot Date: Mon, 30 Mar 2026 10:31:49 -0400 Subject: [PATCH] import CS grubby-8.40-69.el9 --- SOURCES/grubby-bls | 28 +++++++++++++++++----------- SPECS/grubby.spec | 10 +++++++++- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/SOURCES/grubby-bls b/SOURCES/grubby-bls index ebaedc7..59df26e 100755 --- a/SOURCES/grubby-bls +++ b/SOURCES/grubby-bls @@ -563,7 +563,7 @@ set_default_bls() { echo "default=${default}" >> "${zipl_config}" fi fi - + update_grubcfg print_info "The default is ${bls_file[$index]} with index $index and kernel $(get_prefix)${bls_linux[$index]}" } @@ -595,23 +595,29 @@ remove_var_prefix() { update_grubcfg() { - # Older ppc64le OPAL firmware don't have BLS support so grub2-mkconfig has to be run - # to generate a config with menuentry commands. - if [ "${arch}" = "ppc64le" ] && [ -d /sys/firmware/opal ]; then + # Turn on RUN_MKCONFIG on different archs/scenarios + if [[ "${arch}" = 's390' ]] || [[ "${arch}" = 's390x' ]]; then + # On s390/s390x systems, run mkconfig/zipl RUN_MKCONFIG="true" - fi - - # PV and PVH Xen DomU guests boot with pygrub that doesn't have BLS support, - # also Xen Dom0 use the menuentries from 20_linux_xen and not the ones from - # 10_linux. So grub2-mkconfig has to run for both Xen Dom0 and DomU. - if [[ -e /sys/hypervisor/type ]] && grep -q "^xen$" /sys/hypervisor/type; then + elif [[ "${arch}" = "ppc64le" ]] && [[ -d /sys/firmware/opal ]]; then + # Older ppc64le OPAL firmware don't have BLS support so grub2-mkconfig has to be run + # to generate a config with menuentry commands. + RUN_MKCONFIG="true" + elif [[ -e /sys/hypervisor/type ]] && grep -q "^xen$" /sys/hypervisor/type; then if [ ! -e /sys/hypervisor/guest_type ] || ! grep -q "^HVM$" /sys/hypervisor/guest_type; then + # PV and PVH Xen DomU guests boot with pygrub that doesn't have BLS support, + # also Xen Dom0 use the menuentries from 20_linux_xen and not the ones from + # 10_linux. So grub2-mkconfig has to run for both Xen Dom0 and DomU. RUN_MKCONFIG=true fi fi if [[ $RUN_MKCONFIG = "true" ]]; then - grub2-mkconfig --no-grubenv-update -o "${grub_config}" >& /dev/null + if [[ $bootloader = "zipl" ]]; then + zipl + else + grub2-mkconfig --no-grubenv-update -o "${grub_config}" &> /dev/null + fi fi } diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec index ce699a1..b8021a4 100644 --- a/SPECS/grubby.spec +++ b/SPECS/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 67%{?dist} +Release: 69%{?dist} Summary: Command line tool for updating bootloader configs License: GPLv2+ URL: https://github.com/rhinstaller/grubby @@ -131,6 +131,14 @@ current boot environment. %{_mandir}/man8/*.8* %changelog +* Wed Sep 03 2025 Leo Sandoval - 8.40-69 +- grubby-bls: in s390* systems, run zipl on grub cfg update event + Resolves: #RHEL-106612 + +* Wed Jul 30 2025 Leo Sandoval - 8.40-68 +- Update cfg when setting a default kernel + Resolves: #RHEL-106612 + * Mon May 19 2025 Nicolas Frayer - 8.40-67 - Bump NVR - Related: #RHEL-61421