我正在运行 16.0.4 版本的服务器。
我在使用较新的内核时遇到了一些奇怪的问题,导致内核死机,所以我想降级并坚持使用一个我知道对我来说没有问题并且不会造成问题的内核。
我遇到了这个问题(更新后内核降级破坏了我的系统)我遵循了这个答案。
他指出:
请注意,该软件包也
linux-image-generic-lts-raring
将被删除。这意味着您的内核版本将来不会升级apt-get upgrade
。只有当您重新安装时,linux-image-generic-lts-raring
内核版本才会升级。所以这是一个永久的解决方案。
我该如何重新安装linux-image-generic-lts-raring
或者以便再次获取最新的内核?
目前,当我运行的时候,apt-get update
apt-get upgrade
什么也没有得到。我想再次将所有软件包更新到最新版本。
以下是输出apt-cache policy linux-image-generic
linux-image-generic:
Installed: (none)
Candidate: 4.4.0.77.83
Version table:
4.4.0.77.83 500
500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
4.4.0.75.81 500
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
4.4.0.21.22 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
之后apt-get install linux-image-generic
->reboot
的输出apt-cache policy linux-image-generic
:
linux-image-generic:
Installed: 4.4.0.77.83
Candidate: 4.4.0.77.83
Version table:
*** 4.4.0.77.83 500
500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
100 /var/lib/dpkg/status
4.4.0.75.81 500
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
4.4.0.21.22 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
以下是 的输出Output of dpkg -l linux-image*
:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===============================-===============================-===============================================================================================================
un linux-image <none> <none> (no description available)
rc linux-image-4.4.0-31-generic 4.4.0-31.50 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-53-generic 4.4.0-53.74 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-57-generic 4.4.0-57.78 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-59-generic 4.4.0-59.80 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-62-generic 4.4.0-62.83 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-63-generic 4.4.0-63.84 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-64-generic 4.4.0-64.85 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-65-generic 4.4.0-65.86 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-66-generic 4.4.0-66.87 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-67-generic 4.4.0-67.88 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-70-generic 4.4.0-70.91 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-71-generic 4.4.0-71.92 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-72-generic 4.4.0-72.93 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-75-generic 4.4.0-75.96 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-77-generic 4.4.0-77.98 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-31-generic 4.4.0-31.50 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-53-generic 4.4.0-53.74 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-57-generic 4.4.0-57.78 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-59-generic 4.4.0-59.80 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-62-generic 4.4.0-62.83 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-63-generic 4.4.0-63.84 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-64-generic 4.4.0-64.85 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-65-generic 4.4.0-65.86 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-66-generic 4.4.0-66.87 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-67-generic 4.4.0-67.88 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-70-generic 4.4.0-70.91 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-71-generic 4.4.0-71.92 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii linux-image-extra-4.4.0-72-generic 4.4.0-72.93 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii linux-image-extra-4.4.0-75-generic 4.4.0-75.96 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii linux-image-extra-4.4.0-77-generic 4.4.0-77.98 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii linux-image-generic 4.4.0.77.83 amd64 Generic Linux kernel image
当我运行时apt-get update
,apt-get upgrade
它仍然显示没有可用的更新。我很确定应该有可用的更新。
答案1
删除该软件包linux-image-generic-lts-raring
(或等效软件包)将阻止您的系统获取最新版本的内核更新。在您的特定情况下,运行sudo apt-get install linux-image-generic
将加载旨在为您的发行版安装最新内核的元软件包。
安装此软件包后,你应该重新启动并确保你正在使用命令运行最新版本uname -r
,因为你可能还以类似的方式固定了你的内核如何跳过内核更新?。你还可以设置一个特定的内核版本作为启动项,方式类似于如何在引导加载程序中将 Windows 设置为默认引导?
最后, 的输出dpkg -l linux-image*
表明您携带了许多较旧的内核版本。这本身不是问题,但如果您有单独的/boot
分区或有限的磁盘空间,则可能会导致问题。如果您确信内核运行正常且没有问题,请考虑运行sudo apt-get autoremove
,如中所述如何删除旧内核版本来清理启动菜单?和如何在 /boot 中释放更多空间?