Ubuntu – Kernel update gets stuck (Ubuntu 16.04, Kernel 4.4.0-22)


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
    ) 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.


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 ( ...
    Removing linux-image-generic ( ...
    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

Best Answer

Apparently, I have found the culprit. I reinstalled Ubuntu. Updated everything including the kernel. No problems up to now. Next, I started installing the applications I needed. The first one was Eset Nod32 Antivirus. After installing it, restarting, and logging in, Ubuntu froze. After booting into the recovery mode (the graphic mode) and unistalling Eset Nod32 Antivirus and restarting again, everything returned to normal. It seems as if there is a clash between the Linux kernel 4.4.0-22 and this antivirus, for some reason.

Related Question