カーネルが削除されたときに最新のカーネルがインストールされるのを防ぐ方法は?

カーネルが削除されたときに最新のカーネルがインストールされるのを防ぐ方法は?

Ubuntuでは、新しいカーネル()に問題があり、古いカーネル4.18.0-20()で再4.18.0-15起動しました。

これで混乱を避けるために新しいカーネルを削除したいのですが、apt最新のカーネルをインストールするには:

apt -s remove linux-image-4.18.0-20-generic    
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  linux-generic-hwe-18.04 linux-headers-4.18.0-21 
  linux-headers-4.18.0-21-generic linux-headers-generic-hwe-18.04 
  linux-image-4.18.0-21-generic linux-image-generic-hwe-18.04
  linux-modules-4.18.0-21-generic linux-modules-extra-4.18.0-21-generic
The following packages will be REMOVED:
  linux-image-4.18.0-20-generic linux-modules-extra-4.18.0-20-generic
The following NEW packages will be installed:
  linux-headers-4.18.0-21 linux-headers-4.18.0-21-generic linux-image-4.18.0-21-generic
  linux-modules-4.18.0-21-generic linux-modules-extra-4.18.0-21-generic
The following packages will be upgraded:
  linux-generic-hwe-18.04 linux-headers-generic-hwe-18.04 linux-image-generic-hwe-18.04

カーネルが削除されたので、aptカーネルをインストールしたいと思います。4.18.0-214.18.0-20

これが私が望むものではないことをどのように説明するのですか?

ベストアンサー1

問題は以下から来ています。linux-image-generic-hwe-18.04 パック

混乱をもたらすのはまさにこれだ。

解決策:アンインストールしてインストールしてくださいlinux-image-generic

sudo apt install linux-image-4.18.0-20-generic  
sudo apt remove linux-image-generic-hwe-18.04

必要に応じてパッケージにも同じことができますlinux-headers*

カーネルを特定のカーネルに設定するには、手動でインストールできます。

sudo apt install linux-image-generic
sudo apt remove linux-image-generic-hwe-18.04

おすすめ記事