[Bug 1896608] Autopkgtest regression report (grub2/2.02-2ubuntu8.19)

Ubuntu SRU Bot 1896608 at bugs.launchpad.net
Tue Nov 3 15:00:03 UTC 2020


All autopkgtests for the newly accepted grub2 (2.02-2ubuntu8.19) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

ubuntu-image/1.10+18.04ubuntu1 (ppc64el)


Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-
migration/bionic/update_excuses.html#grub2

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

-- 
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/1896608

Title:
  [regression-in-stable] grub-multi-install fails with exit 1 when
  question grub-efi/install_devices_empty is skipped

Status in grub2 package in Ubuntu:
  Fix Released
Status in grub2 source package in Bionic:
  Fix Committed
Status in grub2 source package in Focal:
  Fix Released
Status in grub2 source package in Groovy:
  Fix Released

Bug description:
  [Impact]

   * When both grub-pc & grub-efi-*-signed are installed, it is ok for one of them to not install onto any devices and mark install_devices_empty as true such that machine is booted with just one boot loader type, and not both.
   * In such cases, the recently SRUed postinst will behave incorrectly upon reconfigure, instead demanding user to install both types of bootloaders somewhere.
  * Error can only be triggered by abandonned grub-pc install, as grub-multi-install validates install_devices values and resets configuration logic.

  [Test Case]
   
   * Install in efi mode. Ensure that grub-pc is installed, configure debconf to have seen grub-pc/install_devices_empty question and have it as true, and have grub-pc/install_devices seen and empty.

   * Attempt reconfigure of grub-pc, it should be successful.

  All this can be done in chroot as follows:

  mkdir -p /boot/grub/i386-pc
  touch /boot/grub/i386-pc/core.img
  dpkg-reconfigure grub-pc
  (answer defaults, and choose to not install GRUB to any devices)

  Then:
  dpkg-reconfigure -u grub-pc
  should succed, with exit code 0, when this bug is fixed. The current broken packages return exit code 1.

   * Populate grub-efi/install_devices & grub-pc/install_devices with
  invalid devices and set install_devices_empty to false, attempt non-
  interactive reconfigure. It should still fail. (A check that previous
  bug-fix does not regress).

  [Regression Potential]

   * This partially revert previous update which made that code path
  error out. One too many error paths got added by xnox. The other bug,
  to ensure when installing onto missing devices noninteractively the
  package configure fails is still being check for (test #3).

  [Other Info]

   * original bug report

  A 20.04 machine with grub-efi-amd64-signed that recently got upgraded fails with:
  """
  dpkg: error processing package grub-efi-amd64-signed (--configure):
   installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
  """

  unfortunately not much more context was provided. After some debugging
  it turns out that there are the following lines in /usr/lib/grub/grub-
  multi-install:

  """
    db_get "$question"
    if [ -z "$RET" ]; then
      # Reset the seen flag if the current answer is false, since
      # otherwise we'll loop with no indication of why.
      db_get grub-efi/install_devices_empty
      if [ "$RET" = false ]; then
        db_fset grub-efi/install_devices_empty seen false
      fi
      if db_input critical grub-efi/install_devices_empty; then
        db_go
        db_get grub-efi/install_devices_empty
        if [ "$RET" = true ]; then
          break
        else
          db_fset "$question" seen false
          db_fset grub-efi/install_devices_empty seen false
        fi
      else
        exit 1 # noninteractive
      fi
  """
  when grub-efi/install_devices_empty has the flag "seen" the line

      if db_input critical grub-efi/install_devices_empty; then

  will return "30" if the question was already shown but the rfset eset
  happens only if the anser was "false" earlier. So the code jumps to
  "exit 1".

  So either the code need to always reset the seen flag ( db_fset grub-
  efi/install_devices_empty seen false) or deal with exit code 30 from
  "db_input critical grub-efi/install_devices_empty" more gracefully.

  I can provide a /var/cache/debconf/config.dat to reproduce. I'm not
  entirely sure how to reproduce from a clean install, the bug will only
  happen after the first upgrade.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1896608/+subscriptions



More information about the foundations-bugs mailing list