升级到 15.10 时内核未升级

升级到 15.10 时内核未升级

我从 Ubuntu 15.04 64 位升级到 15.10 64 位。之后内核显示的版本比安装的版本要旧:

$ uname -r
3.13.0-57-generic

即使安装了 4.2:

$ dpkg -l | grep linux-image
rc  linux-image-3.19.0-15-generic       3.19.0-15.15                    amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-3.19.0-22-generic       3.19.0-22.22                    amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-3.19.0-28-generic       3.19.0-28.30                    amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
ii  linux-image-4.2.0-16-generic        4.2.0-16.19                     amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-15-generic 3.19.0-15.15                    amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-22-generic 3.19.0-22.22                    amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-28-generic 3.19.0-28.30                    amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
ii  linux-image-extra-4.2.0-16-generic  4.2.0-16.19                     amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
ii  linux-image-generic                 4.2.0.16.18                     amd64        Generic Linux kernel image

尝试按照其他线程重新安装 linux-general,但没有成功:

$ sudo apt-get install --reinstall linux-generic linux-headers-generic linux-image-generic
[sudo] password for chris: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 3 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/6,658 B of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 60056 files and directories currently installed.)
Preparing to unpack .../linux-generic_4.2.0.16.18_amd64.deb ...
Unpacking linux-generic (4.2.0.16.18) over (4.2.0.16.18) ...
Preparing to unpack .../linux-headers-generic_4.2.0.16.18_amd64.deb ...
Unpacking linux-headers-generic (4.2.0.16.18) over (4.2.0.16.18) ...
Preparing to unpack .../linux-image-generic_4.2.0.16.18_amd64.deb ...
Unpacking linux-image-generic (4.2.0.16.18) over (4.2.0.16.18) ...
Setting up linux-image-generic (4.2.0.16.18) ...
Setting up linux-headers-generic (4.2.0.16.18) ...
Setting up linux-generic (4.2.0.16.18) ...

我已重启多次,但仍然没有任何反应。

我该怎么做才能正确安装内核?它阻止我运行 iptables:

$ sudo iptables -L
modprobe: ERROR: ../libkmod/libkmod.c:578 kmod_search_moddep() could not open moddep file '/lib/modules/3.13.0-57-generic/modules.dep.bin'
iptables v1.4.21: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

任何想法都值得赞赏。如果相关的话,这是在 DigitalOcean droplet 上。谢谢。

答案1

看来您的内核 4.2 已正确安装(如ii软件包名称左侧所示)。也许您只需要更新 grub 配置以将新内核考虑在内?

您是否尝试过该sudo update-grub命令,然后重新启动?

答案2

事实证明,这肯定是其他问题的重复。我一直在执行命令行重启,但没有任何效果。实际上,电源循环可以很好地解决问题。

不记得以前见过这种行为,但也许这是 DigitalOcean/VM 或其他什么东西所特有的。

感谢您的建议!

相关内容