[Bug 2054103] Re: grub-pc reinstallation throws a prompt asking the device it should install on for Noble

Launchpad Bug Tracker 2054103 at bugs.launchpad.net
Tue Aug 27 10:40:13 UTC 2024


This bug was fixed in the package ubuntu-release-upgrader - 1:24.04.22

---------------
ubuntu-release-upgrader (1:24.04.22) noble; urgency=medium

  [ Tobias Heider ]
  * Fix typo in force_obsoletes. (LP: #2076913)

  [ Nick Rosbrook ]
  * DistUpgrade: handle cache key error when removing obsolete packages
    (LP: #2077358)
  * deb2snap: switch snap-store and firmware-updater tracks
    (LP: #2077344)
  * Run pre-build.sh: updating mirrors, demotions, and translations.

ubuntu-release-upgrader (1:24.04.21) noble; urgency=medium

  * DistUpgradeQuirks: disable stub resolver on upgrades from jammy
    (LP: #2043820)
  * DistUpgrade: show a message about denied package removals
    (LP: #2073278)
  * data: add cryptsetup-initramfs to removal_denylist.cfg
    (LP: #2067622)
  * DistUpgradeQuirks: abort if system is not /usr-merged
    (LP: #2058648)
  * DistUpgradeQuirks: disable cloud-init on upgrade
    (LP: #2075968)
  * DistUpgradeQuirks: abort if rabbitmq-server installed
    (LP: #2074309)
  * Run pre-build.sh: updating mirrors, demotions, and translations.

ubuntu-release-upgrader (1:24.04.20) noble; urgency=medium

  [ Mate Kukri ]
  * DistUpgradeQuirks: make sure GRUB "cloud_style_installation" is set in cloud images (LP: #2054103)

  [ Julian Andres Klode ]
  * Move the actiongroup out of the obsoletes loop
  * Reimplement obsolete removal with resolve_by_keep (LP: #1874272)

  [ Nick Rosbrook ]
  * Run pre-build.sh: updating mirrors, demotions, and translations.

 -- Nick Rosbrook <enr0n at ubuntu.com>  Wed, 21 Aug 2024 12:55:15 -0400

** Changed in: ubuntu-release-upgrader (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/2054103

Title:
  grub-pc reinstallation throws a prompt asking the device it should
  install on for Noble

Status in cloud-images:
  Fix Released
Status in grub2 package in Ubuntu:
  Fix Released
Status in ubuntu-release-upgrader package in Ubuntu:
  Invalid
Status in grub2 source package in Noble:
  New
Status in ubuntu-release-upgrader source package in Noble:
  Fix Released

Bug description:
  [ Impact ]

   * We have changed GRUB2 packaging to have two installation modes,
     "cloud style", and default.

   * The cloud style one should be used, and is used by cloud images
     starting with Noble.

   * Pre-noble cloud images don't have this option set, thus the need
     for an u-r-u quirk to set it on upgrade.

  [ Test Plan ]

   * Use debconf-show grub-pc, and look for
  grub-{pc,efi}/cloud_style_installation

   * Test upgrading Jammy -> Noble on a non-cloud install (e.g. installed from an 
     ISO), ensure the debconf option *is not set* afterwards.

   * Test upgrading Jammy -> Noble on a cloud install (e.g. a system deployed from 
    a jammy cloud image), ensure the debconf option *is set* afterwards.

   * Note that this was already verified, so this task is about re-verification
     after the updated u-r-u is in noble-proposed.

  [ Where problems could occur ]

   * This SRU is only about the release upgrader change, thus impact is
     limited to upgrades to Noble.

   * If an installation that cannot use the cloud mechanism in GRUB has
     '/etc/cloud/build.info' present, it could cause grub2 postinst to fail.

   * This is rather unlikely, but a theoretically possible scenario.

  [ Other Info ]

   * See the original bug description below.

  ================================================================================
  grub-pc requires knowing what device to grub-install on, but when cloud images are generated, the device on the deployment target is never known. And so when the package is reinstalled (for example, when unminimizing the minimized image), the user gets that prompt, asking where to install the grub, when this should happen non-interactively, for example, by determining where the grub was first installed.

  Interestingly, this issue always existed, however it was masked by the
  following timeline:

  In July 2020, it was discovered that certain scenarios can cause grub-
  pc installation to fail, and an emergency SRU
  https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1889556 disabled
  grub-pc re-installation on upgrade as a workaround.

  Before the commit https://salsa.debian.org/grub-
  team/grub/-/commit/8d809abe752712cb020e2e95fe21d5832bea52f8 got merged
  into Ubuntu, grub-pc/install-devices being unset in debconf was
  acceptable in practice. This was indeed unset and still is for cloud
  images.

  In Dec 2021, grub2 2.06-2ubuntu1 was uploaded containing the
  previously mentioned commit. But as a result of the above emergency
  SRU, that upload managed to silently change the status quo without it
  ever being noticed.

  In December 2023, the grub-pc installation workaround was finally
  removed in
  https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/2043995 exposing
  grub-pc package upgrade failures in cloud images where grub-
  pc/install-devices in debconf was never in-fact set.

  The plausible solution is to develop something to set the grub-
  pc/install-devices debconf entry on first boot in a cloud deployment,
  which would allow upgrades to function like before.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/2054103/+subscriptions




More information about the foundations-bugs mailing list