[Bug 1928674] Re: grub-efi-amd64 from grub2-unsigned has lost kernel/postinst.d script
Julian Andres Klode
1928674 at bugs.launchpad.net
Thu May 27 10:11:35 UTC 2021
We figured out the root causes for the failure on the cloud, and it is
not a regression of this update compared to the one in -updates, so I'm
marking xenial as verified again.
What is happening on the cloud is that the cloud images ship with the grub "loader" installed into
/boot/efi/EFI/BOOT/BOOTAA64.EFI, which loads the modules and core image from /boot/grub. On upgrade, we install new modules to /boot/grub and the loader to /boot/efi/EFI/ubuntu/grubaa64.efi - we do not replace the removable path one.
We do register the new grub in the boot menu, but the cloud does not seem to persist that - the entry is gone in the next boot (or the 2nd boot?). There are some KVM crashes in the cloud due to
https://github.com/qemu/qemu/commit/089fd80376196adc0274a53eb9729c3ef7ee5ae7 which might be related and corrupt the variable storage, I can't say.
So when we boot the next time, instead of loading the new grubaa64.efi,
it will load the BOOTAA64.EFI from 2.02 instead, which then gets
confused by the 2.04 modules.
We can fix this by passing --force-extra-removable to grub-install,
which is supported in xenial. I believe the maintainer scripts are
messed up a bit. I can set force_efi_extra_removable, but the maintainer
script checks for no_efi_extra_removable. I reconfigured grub-efi-arm64
to set the latter to true, but the former is still true as well, so we
don't pass the argument. Something went wrong in migrating this setting
presumably.
# Skip extra installation to the EFI removable media path?
grub-efi-arm64 grub2/no_efi_extra_removable boolean true
# Force extra installation to the EFI removable media path?
grub-efi-arm64 grub2/force_efi_extra_removable boolean true
** Tags removed: verification-needed verification-needed-xenial
** Tags added: verification-done verification-done-xenial
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1928674
Title:
grub-efi-amd64 from grub2-unsigned has lost kernel/postinst.d script
Status in grub2 package in Ubuntu:
In Progress
Status in grub2-signed package in Ubuntu:
Invalid
Status in grub2-unsigned package in Ubuntu:
Invalid
Status in grub2 source package in Trusty:
Invalid
Status in grub2-signed source package in Trusty:
New
Status in grub2-unsigned source package in Trusty:
Triaged
Status in grub2 source package in Xenial:
Invalid
Status in grub2-signed source package in Xenial:
Fix Committed
Status in grub2-unsigned source package in Xenial:
Fix Committed
Status in grub2 source package in Bionic:
Invalid
Status in grub2-signed source package in Bionic:
Fix Committed
Status in grub2-unsigned source package in Bionic:
Fix Committed
Status in grub2 source package in Focal:
Fix Committed
Status in grub2-signed source package in Focal:
Fix Committed
Status in grub2-unsigned source package in Focal:
Fix Committed
Status in grub2 source package in Groovy:
Won't Fix
Status in grub2-signed source package in Groovy:
Fix Committed
Status in grub2-unsigned source package in Groovy:
Fix Committed
Bug description:
[Impact]
* /etc/kernel/{postinst.d,postrm.d}/zz-update-grub missing on arm64
with grub-efi-arm64 (a dependency of grub-efi-arm64-signed) installed
* /etc/kernel/{postinst.d,postrm.d}/zz-update-grub missing on amd64
with grub-efi-amd64 (an ORed dependency of grub-efi-amd64-signed)
installed.
* This results in newly installed kernels not getting added to
grub.cfg and thus upon reboot one does not boot into the new kernel.
* In later series these scripts moved to grub2-common, which is why
they are absent in the backported grub-efi-* packages. They should be
restored to these packages in the backport.
[Test Plan]
* install grub packages from -updates
* ensure that /etc/kernel/post{inst,rm}.d/zz-update-grub are absent; if necessary, remove them
* Install new grubs
* If testing on amd64 ensure that grub-efi-amd64 is installed, not grub-pc.
* Install a new kernel that was not installed before
* Observe that grub.cfg is regenerated and new kernel is present
* Remove an old kernel
* Observe that grub.cfg is regenerated and new kernel is removed from grub.cfg
* From bionic, verify that a dist-upgrade to focal works without conflicts.
[Where problems could occur]
* These are conffiles. Although nobody should modify them, care
should be taken when moving conffiles around.
[Other Info]
* First reported by klebers
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1928674/+subscriptions
More information about the foundations-bugs
mailing list