I just installed a new kernel on Ubuntu GNOME 17.04 that came in through the normal updates. However, it is now stuck for a while on the following line:
Setting up linux-headers-4.10.0-20-generic (4.10.0-20.22) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.10.0-20-generic /boot/vmlinuz-4.10.0-20-generic
Something seems to hang the process. Does someone know what could cause this?
EDIT: This is the content of /boot as requested:
abi-4.10.0-19-generic grub System.map-4.10.0-19-generic
abi-4.10.0-20-generic initrd.img-4.10.0-19-generic System.map-4.10.0-20-generic
config-4.10.0-19-generic memtest86+.bin vmlinuz-4.10.0-19-generic
config-4.10.0-20-generic memtest86+.elf vmlinuz-4.10.0-19-generic.efi.signed
efi memtest86+_multiboot.bin vmlinuz-4.10.0-20-generic
EDIT 2: Just tried purging the new kernel but got this:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
Using that command returns me to the original problem. I am stuck now 🙁
Best Answer
I just "fixed" it. I was running Ubuntu with my Nvidia Graphics card all the time. I switched back to the build-in Intel graphics with the Nvidia Control Center and rebooted. After this, the configuration of the kernel didn't hang and everything seems to work as normal.
So if you also have this issue, try to change back to Intel graphics before running
dpkg --configure -a