更新
根据 n0rbert 的要求:
ls -al /启动
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 策略 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
我从 17.04 升级到了 17.10。Ubuntu 使用 Gnome Shell,没有 Unity。Nvidia 显卡,使用专有驱动程序。
我设法使用旧内核启动:4.10.0-42-generic
我尝试删除较新的内核但 gpkg 在尝试卸载时出现错误。
它现在会自动使用 4.10.0-42-generic 内核启动,但始终需要密码,尽管我在设置管理器中将其设置为无需密码登录。升级前,这个功能是可以正常工作的。
我试过:
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 安装 -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)
有什么想法吗?