On grub cfg updates, run grub2-mkconfig for Xen systems

Resolves: #RHEL-50691
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
This commit is contained in:
Leo Sandoval 2024-11-25 13:47:35 -06:00
parent 72f15bdd89
commit f37ea2e5e1
2 changed files with 14 additions and 1 deletions

View File

@ -620,6 +620,15 @@ update_grubcfg()
fi fi
fi 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
if [ ! -e /sys/hypervisor/guest_type ] || ! grep -q "^HVM$" /sys/hypervisor/guest_type; then
RUN_MKCONFIG=true
fi
fi
if [[ $RUN_MKCONFIG = "true" ]]; then if [[ $RUN_MKCONFIG = "true" ]]; then
grub2-mkconfig --no-grubenv-update -o "${grub_config}" >& /dev/null grub2-mkconfig --no-grubenv-update -o "${grub_config}" >& /dev/null
fi fi

View File

@ -1,6 +1,6 @@
Name: grubby Name: grubby
Version: 8.40 Version: 8.40
Release: 64%{?dist} Release: 65%{?dist}
Summary: Command line tool for updating bootloader configs Summary: Command line tool for updating bootloader configs
License: GPLv2+ License: GPLv2+
URL: https://github.com/rhinstaller/grubby URL: https://github.com/rhinstaller/grubby
@ -131,6 +131,10 @@ current boot environment.
%{_mandir}/man8/*.8* %{_mandir}/man8/*.8*
%changelog %changelog
* Thu Dec 05 2024 Leo Sandoval <lsandova@redhat.com> - 8.40-65
- On grub cfg updates, run grub2-mkconfig for Xen systems
Resolves: #RHEL-50691
* Wed Jan 10 2024 Marta Lewandowska <mlewando@redhat.com> - 8.40-64 * Wed Jan 10 2024 Marta Lewandowska <mlewando@redhat.com> - 8.40-64
- Do not overwrite all vars that start with GRUB_CMDLINE_LINUX - Do not overwrite all vars that start with GRUB_CMDLINE_LINUX
- Resolves: #RHEL-21301 - Resolves: #RHEL-21301