Accepting request 894458 from home:gary_lin:branches:devel:openSUSE:Factory

- shim-install: instead of assuming "removable" for Azure, remove
  fallback.efi from \EFI\Boot and copy grub.efi/cfg to \EFI\Boot
  to make \EFI\Boot bootable and keep the boot option created by
  efibootmgr (bsc#1185464, bsc#1185961)

OBS-URL: https://build.opensuse.org/request/show/894458
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory/shim-leap?expand=0&rev=33
This commit is contained in:
Gary Ching-Pang Lin 2021-05-20 01:28:18 +00:00 committed by Git OBS Bridge
parent 8eaa401714
commit a24eb74443
2 changed files with 27 additions and 9 deletions

View File

@ -221,15 +221,6 @@ do
esac
done
# bsc#1185464
# The Azure firmware doesn't respect the boot option created by either
# efibootmgr or fallback.efi so we have to skip the installation of
# fallback.efi to avoid the endless reset loop.
if is_azure; then
no_nvram=yes
removable=yes
fi
if test -n "$efidir"; then
efi_fs=`"$grub_probe" --target=fs "${efidir}"`
if test "x$efi_fs" = xfat; then :; else
@ -441,3 +432,22 @@ if test "$no_nvram" = no && test -n "$bootloader_id"; then
fi
fi
# bsc#1185464 bsc#1185961
# The Azure firmware sometimes doesn't respect the boot option created by
# either efibootmgr or fallback.efi so we have to remove fallback.efi to
# avoid the endless reset loop.
if is_azure; then
# Skip the workaround if we don't own \EFI\Boot or the removable
# option is used
if test "$update_boot" = "yes" && test "$removable" = "no"; then
# Remove fallback.efi which could cause the reset loop in Azure
rm -f "${efibootdir}/fallback.efi"
# Remove the older grub binary and config
rm -f "${efibootdir}/grub.efi"
rm -f "${efibootdir}/grub.cfg"
# Install new grub binary and config file to \EFI\Boot as
# the "removable" option
cp "${efidir}/grub.cfg" "${efibootdir}/grub.cfg"
cp "${efidir}/grub.efi" "${efibootdir}/grub.efi"
fi
fi

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu May 20 01:25:06 UTC 2021 - Gary Ching-Pang Lin <glin@suse.com>
- shim-install: instead of assuming "removable" for Azure, remove
fallback.efi from \EFI\Boot and copy grub.efi/cfg to \EFI\Boot
to make \EFI\Boot bootable and keep the boot option created by
efibootmgr (bsc#1185464, bsc#1185961)
-------------------------------------------------------------------
Fri May 7 08:54:20 UTC 2021 - Gary Ching-Pang Lin <glin@suse.com>