Public bug reported: 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. ** Affects: grub2 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783044 Title: grub-efi-amd64 postinst fails to install GRUB if /boot/efi/EFI/ubuntu/ is not present To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1783044/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs