29

更改 grub 启动顺序以应对 PVE 5.0.21-4 内核错误

 3 years ago
source link: https://azhuge233.com/%e6%9b%b4%e6%94%b9-grub-%e5%90%af%e5%8a%a8%e9%a1%ba%e5%ba%8f%e4%bb%a5%e5%ba%94%e5%af%b9-pve-5-0-21-4-%e5%86%85%e6%a0%b8%e9%94%99%e8%af%af/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

19-11-11 更新

社区贴中 PVE 的员工给出了两种解决方法

  1. PVE 即将发布 6.1 版本,随之而来的是 PVE 5.3 内核,所以这个问题也可以通过安装 5.3 内核解决,安装方法如下
    • 编辑 /etc/apt/source.list 文件,加入 PVE 测试源
      deb http://download.proxmox.com/debian/pve buster pvetest
      deb http://download.proxmox.com/debian/pve buster pvetest
    • apt update 更新源
    • 安装 PVE 5.3 内核
      apt install pve-kernel-5.3.7-1-pve
      apt install pve-kernel-5.3.7-1-pve

      当前最新内核为 5.3.7-1,后续如果有更新安装最新内核即可。

  2. 将 grub 文件中的 “GRUB_CMDLINE_LINUX=”<flags here>”” 一行加入如下参数
    noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off mitigations=off
    noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off mitigations=off

    然后 update-grub 更新 grub,重启系统。

原文:

以往我对待包管理都是 update && upgrade 一把梭,结果今天吃了口屎(知道错了,下次还敢.jpg)。

更新了一下 PVE 的软件包,其中包括 PVE 新的内核 5.0.21-4 ,重启后发现所有 Guest OS 无法启动——可以通过 PVE 开启 VM,但是 VM 内部无限重启,Windows Ubuntu BSD 无差别攻击。

之后在论坛找到了相关帖子:

基本上是 5.0.21-4 的锅了,只能等待官方修复,暂时可以通过启动旧内核补救。

  1. 查看并记录可用的 grub 启动项
    • 执行指令
      grep menuentry /boot/grub/grub.cfg
      grep menuentry /boot/grub/grub.cfg

      更改 grub 启动顺序以应对 PVE 5.0.21-4 内核错误

      可以看到此时已经安装了 21-4、21-3 和 15-1 内核,记录 21-3 内核那一行中 【$menuentry_id_option】之后的内容。

    • 因为 21-3 内核的选项是在 【Advanced options for Proxmox Virtual Environment GNU/Linux】这一大菜单下的,所以还需记录“Advanced options for Proxmox Virtual Environment GNU/Linux”更改 grub 启动顺序以应对 PVE 5.0.21-4 内核错误其实输出的内容就是 grub 启动菜单的配置文件——进入 grub 界面后需要选择 Advanced options for Proxmox Virtual Environment GNU/Linux,才能选择 21-3 的内核启动。
  2. 配置 grub
    • 编辑 grub 配置文件
      vim /etc/default/grub
      vim /etc/default/grub
    • 将 GRUB_DEFAULT 变量更改为 【‘Advanced options for Proxmox Virtual Environment GNU/Linux>gnulinux-5.0.21-3-pve-advanced-cdb7e7a4-bb61-4275-afe4-92581c1d1c34’】更改 grub 启动顺序以应对 PVE 5.0.21-4 内核错误
    • 重生成 grub,执行指令
      update-grub
      update-grub

更改 grub 启动顺序以应对 PVE 5.0.21-4 内核错误

这样就完成了配置 grub 自动启动 PVE 5.0.21-3 内核。

OS, 所有PVE

发表评论 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

评论

显示名称 *

电子邮箱地址 *

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK