[Bug 1879558] [NEW] grub-efi-amd64 postinst fails to install GRUB if previous GRUB install is not detected

Daniel Richard G. skunk at iskunk.org
Tue May 19 20:15:20 UTC 2020


Public bug reported:

This concerns grub-efi-amd64 2.04-1ubuntu26 in Ubuntu focal.

Currently, when grub-efi-amd64 (or grub-efi-amd64-signed) is installed
or reconfigured, the following steps occur:

  1. Package postinst script runs

  2. postinst checks if /boot/grub/x86_64-efi/core.efi is present, and
if so...

  3. "/usr/lib/grub/grub-multi-install x86_64-efi" is invoked

The check in #2 is accompanied by this comment:

        # Check /boot/grub to see if we previously installed to an ESP. We don't
        # want to trigger the install code just by installing the package,
        # normally the installer installs grub itself first.

I very much *want* the package install (or configuration) to do the GRUB
install, even if GRUB was not previously installed by the Ubuntu
installer. I am specifically concerned with the case of a system with
grub-pc being transitioned over to grub-efi-amd64. If a standard system
image with the former is installed onto an EFI system, then this
conversion is needed. (There is also the case of systems that are
themselves converted from BIOS booting to EFI.)

I do not know the motivation for the "only install if previously
installed" check, but if the goal is to avoid installing GRUB to a plain
/boot/efi/ directory (one that is not a separate special EFI partition),
then it should be enough to check that /boot/efi/ is a mountpoint. I
think it is reasonable to expect the user to set up the EFI partition
and mount it prior to installing the package.

(Ideally, the package would alert the user if it cannot install GRUB due
to /boot/efi/ not being set up correctly.)

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: focal

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

Title:
  grub-efi-amd64 postinst fails to install GRUB if previous GRUB install
  is not detected

Status in grub2 package in Ubuntu:
  New

Bug description:
  This concerns grub-efi-amd64 2.04-1ubuntu26 in Ubuntu focal.

  Currently, when grub-efi-amd64 (or grub-efi-amd64-signed) is installed
  or reconfigured, the following steps occur:

    1. Package postinst script runs

    2. postinst checks if /boot/grub/x86_64-efi/core.efi is present, and
  if so...

    3. "/usr/lib/grub/grub-multi-install x86_64-efi" is invoked

  The check in #2 is accompanied by this comment:

          # Check /boot/grub to see if we previously installed to an ESP. We don't
          # want to trigger the install code just by installing the package,
          # normally the installer installs grub itself first.

  I very much *want* the package install (or configuration) to do the
  GRUB install, even if GRUB was not previously installed by the Ubuntu
  installer. I am specifically concerned with the case of a system with
  grub-pc being transitioned over to grub-efi-amd64. If a standard
  system image with the former is installed onto an EFI system, then
  this conversion is needed. (There is also the case of systems that are
  themselves converted from BIOS booting to EFI.)

  I do not know the motivation for the "only install if previously
  installed" check, but if the goal is to avoid installing GRUB to a
  plain /boot/efi/ directory (one that is not a separate special EFI
  partition), then it should be enough to check that /boot/efi/ is a
  mountpoint. I think it is reasonable to expect the user to set up the
  EFI partition and mount it prior to installing the package.

  (Ideally, the package would alert the user if it cannot install GRUB
  due to /boot/efi/ not being set up correctly.)

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



More information about the foundations-bugs mailing list