0

Hi guys I am having grub errors every time try to install anything on Ubuntu 20.04

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

Already tried the solution above.

user@user-Nitro-AN515-54:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up grub-efi-amd64 (2.04-1ubuntu44) ...
dpkg: error processing package grub-efi-amd64 (--configure):
installed grub-efi-amd64 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 grub-efi:
grub-efi depends on grub-efi-amd64 (>= 2.04-1ubuntu26.11); however:
Package grub-efi-amd64 is not configured yet.

dpkg: error processing package grub-efi (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of grub-efi-amd64-signed:
grub-efi-amd64-signed depends on grub-efi-amd64 | grub-pc; however:
Package grub-efi-amd64 is not configured yet.
Package grub-pc is not installed.

dpkg: error processing package grub-efi-amd64-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
grub-efi
grub-efi-amd6-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)

1 Answer 1

3

first method

step 1: you can try using --force so, try using sudo apt-get --force-yes remove --purge grub* or with dpkg sudo dpkg -P grub*

step 2: after this you can use sudo dpkg -C or dpkg --list | grep -ve 'ii\|^rc' (I would suggest trying both) and confirm that there is no grub-efi-(anything after this) package listed.

step 3: if you confirm this then you can go with sudo apt-get install grub-efi and install it and then do sudo update-grub.else go with second method

Second method

step 1:

sudo rm /var/lib/dpkg/info/grub*
sudo dpkg --configure -a
sudo apt-get update

now do step 2 and then step 3 of first method.

IMPORTANT if you successfully remove grub-efi by any method then I would suggest do not turn off your computer before installing it again

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.