即使更新到 4.4.0-112-generic(ubuntu 16.04.3 LTS)后,内核恐慌(可能)仍会持续!

即使更新到 4.4.0-112-generic(ubuntu 16.04.3 LTS)后,内核恐慌(可能)仍会持续!

不幸的是,我安装了内核4.4.0-108才看到相关答案: 更新至 4.4.0-108-generic 后内核崩溃

我已经丢弃了有问题的内核(已清除)并切换到 4.4.0-109,从今天起切换到 4.4.0-112,但仍然存在一个问题:无法重新启动系统。除了重新启动操作外,其他一切似乎都运行正常。

在这里,您可以看到该问题的屏幕截图:

打印屏幕

关于如何处理这个问题有什么建议吗?

提前致谢!

答案1

对于我家里的非生产的 16.04 LTS 机器,我做出了以下决定:
我将继续使用 4.4.0-104(和 4.4.0-103 作为后备)和 20170707 intel-microcode,以获得完整和安全的 Meltdown 和 Spectre 修复,这些修复没有副作用(我不是指速度)。

所以我删除了新的内核,重新安装了 103 和 104,并固定了相应的软件包。

警告:如果您在生产服务器或企业桌面上使用 Ubuntu,请不要按照以下步骤操作。

以下是我实现这一目标的步骤:

  1. 删除新内核

    sudo apt-get purge linux-tools-generic linux-headers-generic linux-image-generic \
    linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic linux-image-4.4.0-109-generic linux-image-extra-4.4.0-109-generic linux-tools-4.4.0-109 linux-tools-4.4.0-109-generic \
    linux-headers-4.4.0-110 linux-headers-4.4.0-110-generic linux-image-4.4.0-110-generic linux-image-extra-4.4.0-110-generic linux-tools-4.4.0-110 linux-tools-4.4.0-110-generic \
    linux-headers-4.4.0-111 linux-headers-4.4.0-111-generic linux-image-4.4.0-111-generic linux-image-extra-4.4.0-111-generic linux-tools-4.4.0-111 linux-tools-4.4.0-111-generic \
    linux-headers-4.4.0-112 linux-headers-4.4.0-112-generic linux-image-4.4.0-112-generic linux-image-extra-4.4.0-112-generic linux-tools-4.4.0-112 linux-tools-4.4.0-112-generic 
    
  2. 安装 4.4.0-104 和 4.4.0-103 (作为后备)

    sudo apt-get install linux-headers-4.4.0-104 linux-headers-4.4.0-104-generic \
    linux-image-4.4.0-104-generic linux-image-extra-4.4.0-104-generic \
    linux-tools-4.4.0-104 linux-tools-4.4.0-104-generic linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic \
    linux-image-4.4.0-103-generic linux-image-extra-4.4.0-103-generic \
    linux-tools-4.4.0-103 linux-tools-4.4.0-103-generic
    
  3. 确保从缓存中安装所有 4.4.0-104 软件包

    sudo dpkg -i /var/cache/apt/archives/*4.4.0-104*.deb
    
  4. 固定内核相关的软件包版本

    cat <<EOF | sudo tee /etc/apt/preferences.d/pin-kernels
    Package: linux-headers-4.4.0-104
    Pin: version 4.4.0-104.127
    Pin-Priority: 1337
    
    Package: linux-headers-4.4.0-104-generic
    Pin: version 4.4.0-104.127
    Pin-Priority: 1337
    
    Package: linux-headers-generic
    Pin: version 4.4.0.104.109
    Pin-Priority: 1337
    
    Package: linux-image-4.4.0-104-generic
    Pin: version 4.4.0-104.127
    Pin-Priority: 1337
    
    Package: linux-image-extra-4.4.0-104-generic
    Pin: version 4.4.0-104.127
    Pin-Priority: 1337
    
    Package: linux-image-generic
    Pin: version 4.4.0.104.109
    Pin-Priority: 1337
    
    Package: linux-tools-4.4.0-104
    Pin: version 4.4.0-104.127
    Pin-Priority: 1337
    
    Package: linux-tools-4.4.0-104-generic
    Pin: version 4.4.0-104.127
    Pin-Priority: 1337
    
    Package: linux-libc-dev:i386
    Pin: version 4.4.0-104.127
    Pin-Priority: 1337
    
    Package: linux-libc-dev
    Pin: version 4.4.0-104.127
    Pin-Priority: 1337
    
    Package: linux-tools-common
    Pin: version 4.4.0-104.127
    Pin-Priority: 1337
    
    Package: linux-source
    Pin: version 4.4.0-104.127
    Pin-Priority: 1337
    
    Package: linux-source-4.4.0
    Pin: version 4.4.0-104.127
    Pin-Priority: 1337
    
    Package: intel-microcode
    Pin: version 3.20170707.1~ubuntu16.04.0
    Pin-Priority: 1337
    
    EOF
    

当常规补丁发布时,您只需删除 pin 并使用以下命令安装相应的软件包即可:

sudo rm /etc/apt/preferences.d/pin-kernels
sudo apt-get update
sudo apt-get install linux-tools-generic linux-headers-generic linux-image-generic
sudo apt-get upgrade
sudo apt-get dist-upgrade

相关内容