Got the same problem after removing a custom kernel, but 'dpkg -- configure -a' does not solve it:
$ sudo dpkg --configure -a Setting up initramfs-tools (0.92bubuntu53) ... update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-2.6.32-lx Cannot find /lib/modules/2.6.32-alx update-initramfs: failed for /boot/initrd.img-2.6.32-lx dpkg: subprocess installed post-installation script returned error exit status
Got the same problem after removing a custom kernel, but 'dpkg -- configure -a' does not solve it:
$ sudo dpkg --configure -a
Setting up initramfs-tools (0.92bubuntu53) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools ... img-2.6. 32-lx 2.6.32- alx img-2.6. 32-lx
update-initramfs: Generating /boot/initrd.
Cannot find /lib/modules/
update-initramfs: failed for /boot/initrd.
dpkg: subprocess installed post-installation script returned error exit status