更新至 Linux 内核 4.10.0-38 时卡住了

更新至 Linux 内核 4.10.0-38 时卡住了

安装 Linux 内核 4.10.0-38 时,我的软件更新程序卡住了。当我终止该进程并运行时sudo dpkg --configure -a,我得到了:

Setting up linux-headers-4.10.0-38-generic (4.10.0-38.42) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.10.0-38-generic /boot/vmlinuz-4.10.0-38-generic

然后很长时间什么都没发生。当我按下 时control + C,我得到了:

Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-4.10.0-38-generic.postinst line 110.
dpkg: error processing package linux-headers-4.10.0-38-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up linux-image-4.10.0-38-generic (4.10.0-38.42) ...
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.10.0-38-generic
vmlinuz(/boot/vmlinuz-4.10.0-38-generic
) points to /boot/vmlinuz-4.10.0-38-generic
 (/boot/vmlinuz-4.10.0-38-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.10.0-38-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
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

然后它又卡住了。然后我control + C再次按下,我得到了:

Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.10.0-38-generic.postinst line 1052.
dpkg: error processing package linux-image-4.10.0-38-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-headers-generic:
 linux-headers-generic depends on linux-headers-4.10.0-38-generic; however:
  Package linux-headers-4.10.0-38-generic is not configured yet.

dpkg: error processing package linux-headers-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-headers-4.10.0-38-generic
 linux-image-4.10.0-38-generic
 linux-headers-generic

然后我运行sudo dpkg --config -a并得到:

The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 linux-headers-generic Generic Linux kernel headers

The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 linux-headers-4.10.0-38-generic Linux kernel headers for version 4.10.0 on 64 
 linux-image-4.10.0-38-generic Linux kernel image for version 4.10.0 on 64 bit 

现在我无法使用 apt 安装任何东西,因为每当我使用 apt 时,它都会尝试配置内核并再次卡住。每次启动计算机时,我还需要手动选择内核,因为默认的 4.10.0-38 内核不起作用。我该如何解决这个问题?

我试过此解决方案4.4.0-38通过将命令中的所有替换为4.10.0-38,但没有作用。

现在我的/var/lib/dpkg/status是:

Package: linux-image-extra-4.10.0-38-generic
Status: deinstall ok config-files
Priority: optional
Section: kernel
Installed-Size: 151751
Maintainer: Ubuntu Kernel Team <[email protected]>
Architecture: amd64
Source: linux
Version: 4.10.0-38.42
Depends: linux-image-4.10.0-38-generic, crda | wireless-crda

PS 我使用的是 nvidia 驱动程序,并且安装了 VirtualBox。但是,我没有该/etc/kernel/postinst.d/vboxadd文件。

答案1

我的情况类似 - 更新到 linux kernel 4.10.0-38 时卡住了。很长时间没有反应后,我重启了电脑。但重启还是失败了,我只能在高级模式下重启,选择 Ubuntu,使用 linux 4.8.0-36-generic 选项,(没有 linux 4.8.10 选项导致重启成功。)

对我来说这很有帮助:askubuntu.com/questions/253244/reinstall-latest-kernel 基于此我尝试了这个:sudo apt-get install --reinstall linux-image-generic linux-image-4.8.0-36-generic 安装花了一些时间(0.5-1 小时),但之后重启成功。

相关内容