After performing direct upgrade from Ubuntu 18.04 to 20.04, everytime I install an application following errors are generated in the console:

Do you want to continue? [Y/n]
Setting up grub-efi-amd64-signed (1.142+2.04-1ubuntu26) ... dpkg: error processing package grub-efi-amd64-signed (--configure):
  installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 10 No apport report written because the error message indicates its a followup error from a previous failure. dpkg: dependency problems prevent configuration of shim-signed:
  shim-signed depends on grub-efi-amd64-signed | grub-efi-arm64-signed; however: 
  Package grub-efi-amd64-signed is not configured yet.
   Package grub-efi-arm64-signed is not installed.
dpkg: error processing package shim-signed (--configure):
  dependency problems - leaving unconfigured Errors were encountered while processing:
  grub-efi-amd64-signed  shim-signed E: Sub-process /usr/bin/dpkg returned an error code (1)

However, the application is installed despite the error.

4 Answers 4


I recently upgraded from Ubuntu 19.10 to Ubuntu 20.04. I faced the same problem. The following solution worked for me:

# sudo apt-get purge grub\*
# sudo apt-get install grub-efi
# sudo apt-get autoremove
# sudo update-grub

This is something that is already discussed at this link.

  • 1
    This has no chance of breaking the bootloader?
    – jjxtra
    Dec 21, 2022 at 22:56

There's a similar question in Stack Overflow, and some users report this answer works fine. Could you try and tell if it worked for you?


it didnt worked, but i tried to delete the grub file in etc/default/ mannually (with admin rights) and i went to terminal and i entered

sudo apt-get install grub-efi

It worked then! (:

  • 1
    What didn't work? Swaggat's answer?
    – Frobozz
    Mar 31 at 1:02
  • Details please. As written this is not an answer. Seems you are addressing another question not this one.
    – David
    Apr 1 at 10:02

I discovered 2 causes for this problem.

1. dpkg bug from 2020-04-09

There was a bug in dpkg on 2020-04-09 #1871963 dpkg fails to install grub-efi-amd64 signed and shim-signed which may have been causing this problem, due to an extraneous ;; in the post install script. The error you'd see is:

/var/lib/dpkg/info/grub-efi-amd64-signed.postinst: 23: Syntax error: word unexpected (expecting ")")

2. missing /boot/efi mount

If booting with EFI, the EFI boot partition must be correctly mounted. What finally fixed it for me, was to ensure that /boot and /boot/efi were mounted to different partitions (and the correct ones). Installation of grub-efi-amd64-signed will fail if your EFI partition is not mounted at /boot/efi.

Machines will vary, but my mount points ended up like this:

$ lsblk | grep -E "nvme|sdb"
sdb1       ...  1G   part  /boot
nvme0n1p2  ...  99M  part  /boot/efi

which gives a file structure like this, with the kernel images in /boot, and the main EFI folder under /boot/efi/EFI

/boot$ tree -L 3
├── config-4.14.248
├── config-4.14.248.old
├── config-5.4.0-150-generic
├── config-5.4.0-87-generic
├── efi
│   ├── EFI
│   │   ├── Boot
│   │   ├── Microsoft
│   │   └── ubuntu
│   └── System Volume Information
├── grub
│   ├── fonts
│   ...
│   └── x86_64-efi
│       ├── acpi.mod
│       ├── adler32.mod
│       ...
│       ├── zfs.mod
│       └── zstd.mod
├── initrd.img-4.14.248
├── initrd.img-4.14.248-surface-linux-surface.signed
├── initrd.img-5.4.0-150-generic
├── initrd.img-5.4.0-87-generic

The root cause was dpkg not finding the /boot/efi/EFI directory, and that directory not being a correct EFI/vfat file system. Root cause of the error is this:

`dpkg: error processing package grub-efi-amd64-signed (--configure)`

Once I had /boot/efi mounted correctly, all these errors went away.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .