[Bug 1783044] Re: grub-efi-amd64 postinst fails to install GRUB if /boot/efi/EFI/ubuntu/ is not present
Daniel Richard G.
skunk at iskunk.org
Tue Aug 14 20:35:51 UTC 2018
My understanding is that grub-pc conflicts with grub-efi-amd64 (and
other top-level GRUB packages), so having both installed shouldn't even
be possible. (I've filed a bug report on the Debian side to address
this, as this situation is not ideal: https://bugs.debian.org/904062)
And that if you want the GRUB installation tools, but don't want the
bootloader installed automatically on the running system, then this is
when you'd install a grub-foo-bin package without the corresponding
grub-foo.
My point was just that the "Don't install to the EFI removable media
path" question is not orthogonal to your hypothetical "Create an EFI
subdirectory?" question, so maybe the solution would be to replace the
former with some kind of multi-choice question.
** Bug watch added: Debian Bug tracker #904062
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=904062
--
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:
Confirmed
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