1

UPDATE

As per the request from n0rbert:

ls -al /boot

total 289184
drwxr-xr-x  3 root root     4096 Jan  4 10:22 .
drwxr-xr-x 25 root root     4096 Jan  4 10:22 ..
-rw-r--r--  1 root root  1443962 Nov  9 09:24 abi-4.10.0-40-generic
-rw-r--r--  1 root root  1443962 Dec  4 09:04 abi-4.10.0-42-generic
-rw-r--r--  1 root root   204962 Nov  9 09:24 config-4.10.0-40-generic
-rw-r--r--  1 root root   204962 Dec  4 09:04 config-4.10.0-42-generic
drwxr-xr-x  5 root root     4096 Jan  4 10:22 grub
-rw-r--r--  1 root root 42860302 Dec 30 10:04 initrd.img-4.10.0-40-generic
-rw-r--r--  1 root root 51070561 Jan  3 18:56 initrd.img-4.10.0-42-generic
-rw-r--r--  1 root root 10331442 Dec 30 10:06 initrd.img-4.4.0-59-generic
-rw-r--r--  1 root root 10331451 Dec 30 10:06 initrd.img-4.4.0-62-generic
-rw-r--r--  1 root root 10331444 Dec 30 10:06 initrd.img-4.4.0-64-generic
-rw-r--r--  1 root root 10333637 Dec 30 10:05 initrd.img-4.4.0-66-generic
-rw-r--r--  1 root root 10333568 Dec 30 10:05 initrd.img-4.4.0-70-generic
-rw-r--r--  1 root root 10331426 Dec 30 10:05 initrd.img-4.4.0-71-generic
-rw-r--r--  1 root root 10333539 Dec 30 10:05 initrd.img-4.4.0-72-generic
-rw-r--r--  1 root root 10333541 Dec 30 10:05 initrd.img-4.4.0-75-generic
-rw-r--r--  1 root root 10331414 Dec 30 10:05 initrd.img-4.4.0-77-generic
-rw-r--r--  1 root root 10331448 Dec 30 10:05 initrd.img-4.4.0-78-generic
-rw-r--r--  1 root root 10333583 Dec 30 10:05 initrd.img-4.4.0-79-generic
-rw-r--r--  1 root root 10333546 Dec 30 10:05 initrd.img-4.4.0-81-generic
-rw-r--r--  1 root root 10333589 Dec 30 10:05 initrd.img-4.4.0-83-generic
-rw-r--r--  1 root root 10333559 Dec 30 10:05 initrd.img-4.4.0-87-generic
-rw-r--r--  1 root root 10333515 Dec 30 10:05 initrd.img-4.4.0-89-generic
-rw-r--r--  1 root root 10331408 Dec 30 10:05 initrd.img-4.4.0-91-generic
-rw-r--r--  1 root root 10331445 Dec 30 10:05 initrd.img-4.4.0-92-generic
-rw-r--r--  1 root root   182704 Jan 28  2016 memtest86+.bin
-rw-r--r--  1 root root   184380 Jan 28  2016 memtest86+.elf
-rw-r--r--  1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin
-rw-------  1 root root  3722580 Nov  9 09:24 System.map-4.10.0-40-generic
-rw-------  1 root root  3722463 Dec  4 09:04 System.map-4.10.0-42-generic
-rw-------  1 root root  7587600 Nov  9 09:24 vmlinuz-4.10.0-40-generic
-rw-------  1 root root  7587600 Dec  4 09:04 vmlinuz-4.10.0-42-generic

apt-cache policy dkms

dkms:
  Installed: 2.3-3ubuntu3
  Candidate: 2.3-3ubuntu3
  Version table:
 *** 2.3-3ubuntu3 500
        500 http://ca.archive.ubuntu.com/ubuntu artful/main amd64 Packages
        500 http://ca.archive.ubuntu.com/ubuntu artful/main i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu artful/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu artful/main i386 Packages
        100 /var/lib/dpkg/status

I upgraded from 17.04 to 17.10. Ubuntu with Gnome Shell, no Unity. Nvidia graphics, using proprietary driver.

I managed to boot using the old kernel: 4.10.0-42-generic

I tried removing the newer kernels but gpkg gives errors trying to uninstall.

It now boots with the 4.10.0-42-generic kernel automatically, but always required password, even though i set it to log in without password in the settings manager. This was working before the upgrade.

I tried:

sudo dpkg --configure -a

Setting up linux-image-4.13.0-21-generic (4.13.0-21.24) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.13.0-21-generic
vmlinuz(/boot/vmlinuz-4.13.0-21-generic
) points to /boot/vmlinuz-4.13.0-21-generic
 (/boot/vmlinuz-4.13.0-21-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.13.0-21-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
Error! Could not locate dkms.conf file.
File:  does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.13.0-21-generic.postinst line 1052.
dpkg: error processing package linux-image-4.13.0-21-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 linux-image-4.13.0-21-generic

sudo apt-get install -f

 Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.10.0-40 linux-headers-4.10.0-40-generic
  linux-image-4.10.0-40-generic linux-image-extra-4.10.0-40-generic
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-extra-4.10.0-35-generic linux-image-extra-4.10.0-37-generic
  linux-image-extra-4.10.0-38-generic linux-image-extra-4.13.0-21-generic
0 upgraded, 0 newly installed, 4 to remove and 13 not upgraded.
5 not fully installed or removed.
After this operation, 629 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 265425 files and directories currently installed.)
Removing linux-image-extra-4.10.0-35-generic (4.10.0-35.39) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-35-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
Error! Could not locate dkms.conf file.
File:  does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-35-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.10.0-37-generic (4.10.0-37.41) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-37-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
Error! Could not locate dkms.conf file.
File:  does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-37-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.10.0-38-generic (4.10.0-38.42) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-38-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-38-generic /boot/vmlinuz-4.10.0-38-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-38-generic /boot/vmlinuz-4.10.0-38-generic
Error! Could not locate dkms.conf file.
File:  does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-38-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.13.0-21-generic (4.13.0-21.24) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
Error! Could not locate dkms.conf file.
File:  does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.13.0-21-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-extra-4.10.0-35-generic
 linux-image-extra-4.10.0-37-generic
 linux-image-extra-4.10.0-38-generic
 linux-image-extra-4.13.0-21-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any thoughts?

4
  • also, i can no longer install any packages. by any method (command line, synaptic etc). it fails when trying to uninstall the broken kernel pagakeges. Jan 3, 2018 at 23:29
  • Please update your question with ls -al /boot, apt-cache policy dkms. Did you remove kernels manually from /boot (not with apt-get)?
    – N0rbert
    Jan 4, 2018 at 10:30
  • i did not remove kernels manually from boot. i used apt-get purge. Jan 4, 2018 at 15:22
  • I am having the same problem -- have you found a solution? Feb 1, 2018 at 20:02

0

You must log in to answer this question.

Browse other questions tagged .