The software updater displayed a message that new update are available. I chose install update. Apparently, the updates were supposed to install Kernel version 4.4.0-22. But, the installation process got stuck midway for several hours. I interrupted the update process and ran the command "sudo dpkg --configure -a". The same thing happens here, too. It gets stuck at "run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic"
The results of the command:
sudo dpkg --configure -a
Setting up linux-image-4.4.0-22-generic (4.4.0-22.39) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-22-generic
vmlinuz(/boot/vmlinuz-4.4.0-22-generic
) points to /boot/vmlinuz-4.4.0-22-generic
(/boot/vmlinuz-4.4.0-22-generic) -- doing nothing at /var/lib/dpkg/info
/linux-image-4.4.0-22-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
I would appreciate any help with this.
Update:
I also tried to remove the half-installed kernel packages with the command "sudo dpkg -P linux-generic linux-image-extra-4.4.0-22-generic linux-image-generic linux-image-4.4.0-22-generic". It also gets stuck. Here's the output to the command:
sudo dpkg -P linux-generic linux-image-extra-4.4.0-22-generic linux-image-generic linux-image-4.4.0-22-generic
(Reading database ... 288791 files and directories currently installed.)
Removing linux-generic (4.4.0.22.23) ...
Removing linux-image-generic (4.4.0.22.23) ...
Removing linux-image-extra-4.4.0-22-generic (4.4.0-22.39) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
Glad to see you've got it solved (above) though! It always seems to be some obscure little thing you don't expect or overlook doesn't it?
– Tim Oates May 08 '16 at 22:47