1

Please refer to below logs. I am facing this issue after I upgraded from 18.10 to 19.04 Ubuntu, Please suggest me fix. Thanks.

royal:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up grub-efi-amd64-signed (1.115+2.02+dfsg1-12ubuntu2) ...
Installing for x86_64-efi platform.
Could not prepare Boot variable: Function not implemented
grub-install: error: efibootmgr failed to register the boot entry: Input/output error.
dpkg: error processing package grub-efi-amd64-signed (--configure):
 installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
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
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 grub-efi-amd64-signed
 shim-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)
  • apparently one of your partitions (probably /boot) is mounted correctly because of mismached UUID. if you manage to mount it using Disks then the error should go away : https://askubuntu.com/a/986138/307184 – tatsu Apr 23 '19 at 09:33

1 Answers1

1

I've came across this issue after upgrading from 18.10 to 19.04 using sudo apt dist-upgrade. GRUB was not working, fortunately, my Ubuntu was booting, possibly it was recognized by EFI mechanizm.

My research led to the conclusion that the reason for this error must be in a newer version of libefivar1 library. I've downgraded it to the latest version provided for Ubuntu 18.10 along with it's dependencies.

First, I went to Ubuntu Packages and downloaded the following packages for cosmic release to a separate folder, for example grub fix:

  1. grub-efi-amd64-bin
  2. grub-efi-amd64-signed
  3. grub-common
  4. grub-pc
  5. grub-pc-bin
  6. grub2-common
  7. os-prober
  8. grub-gfxpayload-lists
  9. libefivar1
  10. efibootmgr
  11. efivar

After that I removed those packages in the newest versions delivered with 19.04 disco release:

sudo apt remove grub-efi-amd64-bin grub-efi-amd64-signed grub-common grub-pc grub-pc-bin grub2-common os-prober grub-gfxpayload-lists libefivar1

And installed previously downloaded packages for cosmic release:

cd grub\ fix/
sudo dpkg -i *.deb

Finally, it's a good idea to prevent them from upgrading:

sudo apt-mark hold grub-efi-amd64-bin grub-efi-amd64-signed grub-common grub-pc grub-pc-bin grub2-common os-prober grub-gfxpayload-lists libefivar1

After a permanent fix is provided by the Ubuntu developers, the following should upgrade the packages to the latest 19.04 version:

sudo apt-mark unhold grub-efi-amd64-bin grub-efi-amd64-signed grub-common grub-pc grub-pc-bin grub2-common os-prober grub-gfxpayload-lists libefivar1
sudo apt upgrade

If you are not able to boot up your freshly installed Ubuntu 19.04 at all, maybe you can combine my steps with steps from this answer using live Ubuntu 19.04 or just use those steps on 18.10 to make Ubuntu booting again.

  • I am able to boot. I am also thinking to hold the upgrade till a fix is provided. Can you please tell from where to download those cosmic packages? Can you provide me some link of them? Thanks in advance for your time and efforts. – Omkar Nath Singh May 22 '19 at 06:36
  • To prevent those packages from updating, use the following command: sudo apt-mark hold grub-efi-amd64-bin grub-efi-amd64-signed grub-common grub-pc grub-pc-bin grub2-common os-prober grub-gfxpayload-lists libefivar1

    When the fix is around, just run: sudo apt-mark unhold grub-efi-amd64-bin grub-efi-amd64-signed grub-common grub-pc grub-pc-bin grub2-common os-prober grub-gfxpayload-lists libefivar1 sudo apt update sudo apt upgrade

    – Szymon Cybulski May 22 '19 at 09:28
  • To download packages, go to Ubuntu Packages and use search engine Search package directories. As a distribution, select cosmic. Search for each of 11 packages I've provided in a list in my answer, download into a separate folder and install using dpkg - please read my answer again, I think I've provided enough details :) Let me know if it works for you! – Szymon Cybulski May 22 '19 at 09:32