[Bug 2043995] Re: fix grub-install to not write modules to /boot before we know we have a valid disk target
Launchpad Bug Tracker
2043995 at bugs.launchpad.net
Thu Dec 7 23:23:22 UTC 2023
This bug was fixed in the package grub2 - 2.12~rc1-12ubuntu3
---------------
grub2 (2.12~rc1-12ubuntu3) noble; urgency=medium
* d/p/delay-copying-to-grubdir.patch: Improve grub-install robustness by
delaying the update of /boot after install device validation
* Remove workaround for LP: 1889556 (LP: #2043995)
- Was not needed since /boot rollback was introduced upstream
- Patch above ensures that this will not reoccur even if rollback fails
-- Mate Kukri <mate.kukri at canonical.com> Tue, 21 Nov 2023 15:35:55
+0000
** Changed in: grub2 (Ubuntu Noble)
Status: Fix Committed => Fix Released
--
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/2043995
Title:
fix grub-install to not write modules to /boot before we know we have
a valid disk target
Status in grub2 package in Ubuntu:
Fix Released
Status in grub2 source package in Noble:
Fix Released
Bug description:
grub2 2.04-1ubuntu26.2 in 2020 introduced a workaround in focal for
the fact that grub2 would write updated modules to /boot/grub, and
only afterwards check that it had a valid disk target for installation
of the first stage bootloader, with the result that if the debconf
config for grub was outdated and points at a device that no longer
exists, and there is ABI skew between the 1st/2nd stage bootloader and
the grub modules from the new package, the system becomes unbootable
because it is unable to load modules from the /boot filesystem, and
rollback is not possible (LP: #1889556).
This was supposed to be a workaround, but the work was never done to
fix grub-install behavior to avoid this detectable and avoidable
failure.
We need grub-install to validate the target disk, and if it is
unavailable, abort BEFORE updating /boot/grub with incompatible
contents.
Once this is done, the postinst hack that skips grub-install for grub-
pc should be dropped.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/2043995/+subscriptions
More information about the foundations-bugs
mailing list