在Debian 8 Jessie上升级内核

我有一个Debian 8 Jessie服务器,我想升级我的内核到至less版本4,以便使用Docker覆盖fs。

我目前的内核是:

$ uname -r 3.16.0-4-amd64 

我遵循一个指导,指出将backports存储库添加到/etc/apt/sources.list文件。 我添加了这一行:

 deb http://httpredir.debian.org/debian jessie-backports main 

我做了apt-get update ,现在是apt-cache search linux-image的输出:

 linux-headers-3.16.0-4-amd64 - Header files for Linux 3.16.0-4-amd64 linux-image-3.16.0-4-amd64 - Linux 3.16 for 64-bit PCs linux-image-3.16.0-4-amd64-dbg - Debugging symbols for Linux 3.16.0-4-amd64 linux-image-amd64 - Linux for 64-bit PCs (meta-package) linux-image-amd64-dbg - Debugging symbols for Linux amd64 configuration (meta-package) nvidia-kernel-3.16.0-4-amd64 - NVIDIA binary kernel module for Linux 3.16.0-4-amd64 linux-headers-4.8.0-0.bpo.2-amd64 - Header files for Linux 4.8.0-0.bpo.2-amd64 linux-headers-4.8.0-0.bpo.2-rt-amd64 - Header files for Linux 4.8.0-0.bpo.2-rt-amd64 linux-headers-4.9.0-0.bpo.1-amd64 - Header files for Linux 4.9.0-0.bpo.1-amd64 linux-headers-4.9.0-0.bpo.1-rt-amd64 - Header files for Linux 4.9.0-0.bpo.1-rt-amd64 linux-image-4.8.0-0.bpo.2-amd64-dbg - Debugging symbols for Linux 4.8.0-0.bpo.2-amd64 linux-image-4.8.0-0.bpo.2-amd64-unsigned - Linux 4.8 for 64-bit PCs linux-image-4.8.0-0.bpo.2-rt-amd64-dbg - Debugging symbols for Linux 4.8.0-0.bpo.2-rt-amd64 linux-image-4.8.0-0.bpo.2-rt-amd64-unsigned - Linux 4.8 for 64-bit PCs, PREEMPT_RT linux-image-4.9.0-0.bpo.1-amd64-dbg - Debugging symbols for Linux 4.9.0-0.bpo.1-amd64 linux-image-4.9.0-0.bpo.1-amd64-unsigned - Linux 4.9 for 64-bit PCs linux-image-4.9.0-0.bpo.1-rt-amd64-dbg - Debugging symbols for Linux 4.9.0-0.bpo.1-rt-amd64 linux-image-4.9.0-0.bpo.1-rt-amd64-unsigned - Linux 4.9 for 64-bit PCs, PREEMPT_RT linux-headers-4.8.0-2-grsec-amd64 - Header files for Linux 4.8.0-2-grsec-amd64 linux-image-4.8.0-2-grsec-amd64 - Linux 4.8 for 64-bit PCs, Grsecurity protection linux-image-grsec-amd64 - Linux image meta-package, grsec featureset linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT linux-image-rt-amd64-dbg - Debugging symbols for Linux rt-amd64 configuration (meta-package) linux-image-4.8.0-0.bpo.2-amd64 - Linux 4.8 for 64-bit PCs (signed) linux-image-4.8.0-0.bpo.2-rt-amd64 - Linux 4.8 for 64-bit PCs, PREEMPT_RT (signed) linux-image-4.9.0-0.bpo.1-amd64 - Linux 4.9 for 64-bit PCs (signed) linux-image-4.9.0-0.bpo.1-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT (signed) 

导游说继续

 sudo apt-get install linux-image-amd64/jessie-backports 

我做到了,我得到了这个输出:

 $ sudo apt-get install linux-image-amd64/jessie-backports Reading package lists... Done Building dependency tree Reading state information... Done Selected version '4.9+78~bpo8+1' (Debian Backports:jessie-backports [amd64]) for 'linux-image-amd64' Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: linux-image-amd64 : Depends: linux-image-4.9.0-0.bpo.1-amd64 E: Unable to correct problems, you have held broken packages. 

我应该从这里做什么? 我应该明确安装linux-image-4.9.0-0.bpo.1-rt-amd64而不是linux-image-amd64吗? 如果是的话,我应该安装其他软件包吗?

ps安装一个新的内核会自动删除旧的还是我必须手动删除旧的?

我切换到backport内核的原因与您(docker)相同。 backport内核对已经安装的软件包有依赖性,但是不在backport内核需要的版本中。 新版本也可以在backports存储库中使用。 但是,apt-get不会自动从backports repo安装依赖项(除非configuration为这样)。 换句话说,您需要显式安装依赖关系,以及backport内核。

依赖关系是

  • 基于Linux的(我相信这一点)
  • KMOD
  • initramfs的工具