Score:0

Nothing is upgrading or updating in Ubuntu 20.04.,,dpkg: error processing package linux-image-5.13.0-27-generic (--configure):

cn flag

Whenever I try to install a new package on Ubuntu, I get the following error:

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.
Do you want to continue? [Y/n] y
Setting up linux-image-5.13.0-30-generic (5.13.0-30.33~20.04.1) ...
Setting up linux-image-5.13.0-28-generic (5.13.0-28.31~20.04.1) ...
Setting up linux-image-5.13.0-27-generic (5.13.0-27.29~20.04.1) ...
Processing triggers for linux-image-5.13.0-30-generic (5.13.0-30.33~20.04.1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.13.0-30-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.13.0-30-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 2: /etc/default/grub: Debian: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-30-generic (--configure):
 installed linux-image-5.13.0-30-generic package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.13.0-28-generic (5.13.0-28.31~20.04.1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.13.0-28-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.13.0-28-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 2: /etc/default/grub: Debian: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-28-generic (--configure):
 installed linux-image-5.13.0-28-generic package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.13.0-27-generic (5.13.0-27.29~20.04.1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.13.0-27-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.13.0-27-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 2: /etc/default/grub: Debian: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-27-generic (--configure):
 installed linux-image-5.13.0-27-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-5.13.0-30-generic
 linux-image-5.13.0-28-generic
 linux-image-5.13.0-27-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

enter image description here

How do I resolve this?

nobody avatar
gh flag
`sudo mv /etc/default/grub /etc/default/grub.bak` `sudo cp /usr/share/grub/default/grub /etc/default/` this error is not since yesterday. `sudo dpkg --configure -a` I hope you have enough space.
Score:1
hm flag

I had the same problem. The comment by nobody, worked for me:

sudo mv /etc/default/grub /etc/default/grub.bak
sudo cp /usr/share/grub/default/grub  /etc/default/
sudo dpkg --configure -a

These commands remove the current grub configuration at /etc/default/grub, and restores the default grub configuration from /usr/share/grub/default/grub

Someone avatar
my flag
FYI: This is **NOT** an NAA (not an answer). This exactly answers the question. @Flaggers.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.