Comment 4 for bug 2025915

Revision history for this message
Richard Smith (brewsmithy) wrote :

I was having a similar error with dpkg as follows --

In my case my grub configuration was erroring - I had added zswap to the system, and added the line "
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
zswap.enabled=1"

My mistake, the correct method to add the line is " GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1"

After changing the grub file (sudo gedit grub), then running "sudo update-grub", my update and upgrade errors from dpkg vanished. I haven't rebooted yet, that is next!

sudo dpkg --configure -a
Setting up linux-image-6.2.0-35-generic (6.2.0-35.35~22.04.1) ...
Processing triggers for linux-image-6.2.0-35-generic (6.2.0-35.35~22.04.1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: autoinstall for dkms modules has been disabled
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.2.0-35-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 12: /etc/default/grub: zswap.enabled=1: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-6.2.0-35-generic (--configure):
 installed linux-image-6.2.0-35-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-6.2.0-35-generic