From a87ab03e502a17dcfb97d2ca101aa6e918fd60f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 13 Jan 2023 17:49:45 +0100 Subject: [PATCH] Do not override stub grub.cfg on EFI partition Grub2 in R4.2 is made to include grub.cfg from primary /boot partition, even on EFI systems - so it always lives in the same place. Do not not override the config stub. QubesOS/qubes-issues#7985 --- system-config/kernel-grub2.install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system-config/kernel-grub2.install b/system-config/kernel-grub2.install index 84ab9a6e..533cdd4a 100755 --- a/system-config/kernel-grub2.install +++ b/system-config/kernel-grub2.install @@ -22,7 +22,8 @@ if [ -x /usr/sbin/grub2-mkconfig ]; then if [ -e /boot/grub2/grub.cfg ]; then grub2-mkconfig -o /boot/grub2/grub.cfg fi - if [ -e /boot/efi/EFI/qubes/grub.cfg ]; then + if [ -e /boot/efi/EFI/qubes/grub.cfg ] && \ + ! grep -q "configfile" /boot/efi/EFI/qubes/grub.cfg; then grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg fi fi