File 0001-Fix-EFI-grub2.patch of Package transactional-update.16292
commit 5f85dfd7b9060760cf70d9dede4dfdaf7ad9274a
Author: Ignaz Forster <iforster@suse.com>
Date: Thu Mar 26 09:08:05 2020 +0100
Mount efivarfs on EFI systems
If the EFI variables are not available, pbl will attach incorrect parameters
to grub2-install, writing the binary to a wrong location [boo#1162320].
diff -ur transactional-update-2.15.orig/sbin/transactional-update.in transactional-update-2.15/sbin/transactional-update.in
--- transactional-update-2.15.orig/sbin/transactional-update.in 2020-08-18 10:37:33.363257818 +0200
+++ transactional-update-2.15/sbin/transactional-update.in 2020-08-18 10:56:05.234222693 +0200
@@ -1087,6 +1087,15 @@
log_error "ERROR: mount of sys failed!"
quit 1
fi
+ if [ -e /sys/firmware/efi/efivars ]; then
+ # If available the EFI variables have to be visible, otherwise pbl will
+ # set an incorrect installation location [boo#1162320].
+ mount -t efivarfs efivarfs ${SNAPSHOT_DIR}/sys/firmware/efi/efivars
+ if [ $? -ne 0 ]; then
+ log_error "ERROR: mount of efivarfs failed!"
+ quit 1
+ fi
+ fi
if [ ${ETC_IS_OVERLAY} -eq 1 ]; then
etc_opts="defaults,"
etc_opts+="lowerdir=/etc,"