[Bug 2043995] Re: fix grub-install to not write modules to /boot before we know we have a valid disk target

Julian Andres Klode 2043995 at bugs.launchpad.net
Tue Nov 28 11:51:09 UTC 2023


** Changed in: grub2 (Ubuntu Noble)
       Status: New => Fix Committed

-- 
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 Committed
Status in grub2 source package in Noble:
  Fix Committed

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