[Bug 1783044] Re: grub-efi-amd64 postinst fails to install GRUB if /boot/efi/EFI/ubuntu/ is not present

Mathieu Trudel-Lapierre mathieu.tl at gmail.com
Wed Oct 3 14:27:26 UTC 2018


** Changed in: grub2 (Ubuntu)
       Status: Confirmed => Triaged

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

Title:
  grub-efi-amd64 postinst fails to install GRUB if /boot/efi/EFI/ubuntu/
  is not present

Status in grub2 package in Ubuntu:
  Triaged

Bug description:
  This concerns grub-efi-amd64 2.02-2ubuntu8.1 in Ubuntu 18.04/bionic.

  When the grub-efi-amd64 package is initially installed on a system
  that has not previously booted via the Ubuntu EFI bootloader (so
  /boot/efi/ is either empty, or at least does not have a
  /boot/efi/EFI/ubuntu/ directory), the package postinst script fails to
  install anything into /boot/efi/.

  The postinst script, in fact, contains this conditional around the
  grub-install invocation:

      if [ "$bootloader_id" ] && [ -d "/boot/efi/EFI/$bootloader_id" ];
  then

  It's not clear why this is here. There might be a reason why you would
  not want to install/update the bootloader if the directory for it
  isn't already there. In my case, however, I am running the postinst
  script (via dpkg-reconfigure) precisely to populate an EFI partition
  from scratch.

  I can work around this issue with a simple

      # mkdir -p /boot/efi/EFI/ubuntu

  before running dpkg-reconfigure, but this is far from obvious.

  An additional problem with the conditional is that if it fails, no
  message is given to the user that the postinst is omitting the GRUB
  install, let alone the reason why. If the user misses the absence of
  the grub-install message, they'll only find out something went wrong
  when they attempt to boot using the newly-installed bootloader and it
  doesn't work.

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



More information about the foundations-bugs mailing list