Comment 74 for bug 122560

Revision history for this message
Ethan Arnold (ethan-arnold) wrote :

I'm sorry, I tried the hint in comment +41 (https://bugs.launchpad.net/ubuntu/+bug/122560/comments/41) but didnt check my installed kernel version before.
The dpkg (line 2) quit and now my database seems corrupt, and nothing seems to be able to fix it. dpkg -d won't uninstall it, and Synaptic also reports that it's broken and tries to remove it, but always dpkg causes an error (1).

$ sudo dpkg -C
The following packages are only half installed, due to problems during
installation. The installation can probably be completed by retrying it;
the packages can be removed using dselect or dpkg --remove:
 linux-ubuntu-modules-2.6.22-10-generic Ubuntu supplied Linux modules for versi

$ sudo dpkg -r linux-ubuntu-modules-2.6.22-10-generic_2.6.22-10.24_i386.deb-122560.1
dpkg - warning: ignoring request to remove linux-ubuntu-modules-2.6.22-10-generic_2.6.22-10.24_i386.deb-122560.1 which isn't installed.

$ sudo apt-get upgrade
[...]
Removing linux-ubuntu-modules-2.6.22-10-generic ...
FATAL: Could not open '/boot/System.map-2.6.22-10-generic': No such file or directory
update-initramfs: Generating /boot/initrd.img-2.6.22-10-generic
Cannot find /lib/modules/2.6.22-10-generic
update-initramfs: failed for /boot/initrd.img-2.6.22-10-generic
dpkg: error processing linux-ubuntu-modules-2.6.22-10-generic (--remove):
 subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-ubuntu-modules-2.6.22-10-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I fix this issue without completely reinstalling?