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

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

View File

@ -620,6 +620,15 @@ update_grubcfg()
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
grub2-mkconfig --no-grubenv-update -o "${grub_config}" >& /dev/null
fi

View File

@ -3,7 +3,7 @@
Name: grubby
Version: 8.40
Release: 77%{?dist}
Release: 78%{?dist}
Summary: Command line tool for updating bootloader configs
License: GPL-2.0-or-later
Source1: grubby-bls
@ -74,6 +74,10 @@ fi
%{_mandir}/man8/grubby.8*
%changelog
* Thu Dec 05 2024 Leo Sandoval <lsandova@redhat.com> - 8.40-78
- On grub cfg updates, run grub2-mkconfig for Xen systems
Resolves: #RHEL-70200
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 8.40-77
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018