diff --git a/grubby-bls b/grubby-bls index fc50e67..59df26e 100755 --- a/grubby-bls +++ b/grubby-bls @@ -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/grubby.spec b/grubby.spec index d4ab5df..b8021a4 100644 --- a/grubby.spec +++ b/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 68%{?dist} +Release: 69%{?dist} Summary: Command line tool for updating bootloader configs License: GPLv2+ URL: https://github.com/rhinstaller/grubby @@ -131,6 +131,10 @@ 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