Ubuntu – Grub-efi-amd64-signed package post-installation script subprocess returned error exit status 127

aptdual-bootgrub-efi

My dual boot laptop runs Ubuntu 18.04.3 as my main OS after an upgrade, also with Windows. Whenever I attempt to install or update apps I get this error:

Setting up grub-efi-amd64-signed (1.128+2.04-1ubuntu12) ...
dpkg: error processing package grub-efi-amd64-signed (--configure):
 installed grub-efi-amd64-signed package post-installation script subprocess ret
urned error exit status 127
Errors were encountered while processing:
 grub-efi-amd64-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Now this happens with any interaction apt which is very inconvenient. I already attempted to update grub but did not have any solution with that.

Heres my dpkg and fstab if that can be any help.

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                  Version              Architecture Description
+++-=====================-====================-============-===============================================================
un  grub                  <none>               <none>       (no description available)
un  grub-cloud-amd64      <none>               <none>       (no description available)
ii  grub-common           2.04-1ubuntu12       amd64        GRand Unified Bootloader (common files)
un  grub-coreboot         <none>               <none>       (no description available)
un  grub-doc              <none>               <none>       (no description available)
ii  grub-efi              2.04-1ubuntu12       amd64        GRand Unified Bootloader, version 2 (dummy package)
ii  grub-efi-amd64        2.04-1ubuntu12       amd64        GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii  grub-efi-amd64-bin    2.04-1ubuntu12       amd64        GRand Unified Bootloader, version 2 (EFI-AMD64 modules)
iF  grub-efi-amd64-signed 1.128+2.04-1ubuntu12 amd64        GRand Unified Bootloader, version 2 (EFI-AMD64 version, signed)
un  grub-efi-arm          <none>               <none>       (no description available)
un  grub-efi-arm64        <none>               <none>       (no description available)
un  grub-efi-ia32         <none>               <none>       (no description available)
un  grub-efi-ia64         <none>               <none>       (no description available)
un  grub-emu              <none>               <none>       (no description available)
un  grub-ieee1275         <none>               <none>       (no description available)
un  grub-legacy           <none>               <none>       (no description available)
un  grub-legacy-doc       <none>               <none>       (no description available)
un  grub-linuxbios        <none>               <none>       (no description available)
un  grub-pc               <none>               <none>       (no description available)
un  grub-uboot            <none>               <none>       (no description available)
un  grub-xen              <none>               <none>       (no description available)
un  grub-yeeloong         <none>               <none>       (no description available)
un  grub2                 <none>               <none>       (no description available)
ii  grub2-common          2.04-1ubuntu12       amd64        GRand Unified Bootloader (common files for version 2)

fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/ubuntu--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/nvme0n1p2 during installation
UUID=d5d23cc4-21a5-4c06-bf9a-9a74d76d315b /boot           ext4    defaults        0       2
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=93E0-B2F2  /boot/efi       vfat    umask=0077      0       1
/dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0

Best Answer

  • According to this bug report, you need to install mokutil to fix the problem.

    It seems that this package is a missing dependency.