我的服务器是 20.04.2 LTS,但仍在内核 4.4.0-75 上,无法启动到较新的内核

我的服务器是 20.04.2 LTS,但仍在内核 4.4.0-75 上,无法启动到较新的内核

我的服务器是一家托管公司的 Xen VPS,支持有限,因此我与他们谈论此事时没有取得多大成功。

当我设置服务器时,他们唯一可用的映像是 16.04.02 LTS,因此我使用了它,然后立即将其升级到 20.04.2 LTS,但是它仍然运行内核 4.4.0-75,我相信它是从 2017 年开始的,我担心潜在的安全问题。

已安装的内核包:

# dpkg --list | grep linux-image
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-5.4.0-72-generic         5.4.0-72.80                                          amd64        Signed kernel image generic
ii  linux-image-5.4.0-73-generic         5.4.0-73.82                                          amd64        Signed kernel image generic
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-generic                  5.4.0.73.76                                          amd64        Generic Linux kernel image
ii  linux-image-virtual                  5.4.0.73.76                                          amd64        Virtual Linux kernel image

我运行了“update-grub”并重新启动,由于服务器无法启动,停机了几个小时。重新启动时我通过串行控制台连接,但 Grub 计时器太短,我无法与菜单交互,当它尝试启动到 5.4.0-73 时,它失败了,并将我踢出控制台,阻止我重新进入。如果我使用 VPS 管理中的“启动”选项,如果我非常快,我可以回到控制台片刻,然后它再次将我踢出,但正如提到的,Grub 超时太短,无法与其交互。

我向 VPS 公司开具了一张工单,他们恢复了服务器,但他们所做的只是将其设置为重新启动到 4.4.0-75,并说较新的内核“似乎不起作用”

我更改了 Grub 配置以延长超时时间,然后尝试再次重新启动。现在我可以与 Grub 菜单交​​互,并更清楚地了解正在发生的事情。当我尝试启动 5.4.0-73 或 5.4.0-72(包括恢复模式)时,没有错误消息,VM 只是默默关闭,我必须再次启动它。

启动失败时不会生成任何日志

也许 VPS 系统和较新的内核分支之间存在一些不兼容性,所以我想我可以继续使用 4.4,只是为了安全起见,只需移动一个较新的版本,但我找不到软件包

packages.ubuntu.com 上的大多数链接都已失效

就像我想我可能需要查看 Xenial 包,但链接的页面https://packages.ubuntu.com/xenial-updates/是无效链接

我在运行 update-grub 时也遇到了错误,但我不知道这些错误是否与此有关;在 Google 上搜索了很多,但没有找到解决方案或有用的信息

# update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
Found linux image: /boot/vmlinuz-5.4.0-73-generic
Found initrd image: /boot/initrd.img-5.4.0-73-generic
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
Found linux image: /boot/vmlinuz-5.4.0-72-generic
Found initrd image: /boot/initrd.img-5.4.0-72-generic
Found linux image: /boot/vmlinuz-4.4.0-75-generic
Found initrd image: /boot/initrd.img-4.4.0-75-generic
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to partition device /dev/xvda1.
done

相关内容