From c4c351556e8c8dea774f29cceea6736ef54fd6b3 Mon Sep 17 00:00:00 2001 From: JarrahG Date: Tue, 17 Dec 2019 05:47:54 +1100 Subject: [PATCH] Change posttrans script to install grub-efi configuration Remove xen.cfg modification code. Clone grub-legacy configuration update code and modify to update EFI configuration Remove comment stating that grub does not support xen in efi mode. --- kernel.spec.in | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/kernel.spec.in b/kernel.spec.in index a0bd63b..895794c 100644 --- a/kernel.spec.in +++ b/kernel.spec.in @@ -514,19 +514,18 @@ if [ -f /etc/default/grub ]; then fi fi -if [ -f /boot/efi/EFI/qubes/xen.cfg ]; then - if ! grep -q plymouth.ignore-serial-consoles /boot/efi/EFI/qubes/xen.cfg; then - sed -i 's/kernel=.*/& plymouth.ignore-serial-consoles/g' /boot/efi/EFI/qubes/xen.cfg - fi -fi - /bin/kernel-install add %{kernelrelease} /boot/vmlinuz-%{kernelrelease} || exit $? -# grubby (used by new-kernel-pkg) do not understand xen entries in grub2 config +# Generate legacy boot grub config if [ -x /sbin/new-kernel-pkg -a -e /boot/grub2/grub.cfg ]; then grub2-mkconfig > /boot/grub2/grub.cfg fi +# Generate EFI boot grub config +if [ -x /sbin/new-kernel-pkg -a -e /boot/efi/EFI/qubes/grub.cfg ]; then + grub2-mkconfig > /boot/efi/EFI/qubes/grub.cfg +fi + %preun /bin/kernel-install remove %{kernelrelease} /boot/vmlinuz-%{kernelrelease} || exit $?