Bug 2687 - [Anolis 23 Preview beta][aarch64]arm 云上机型内核切换为5.19后,在切换为5.10内核uname -a查询显示错误
Summary: [Anolis 23 Preview beta][aarch64]arm 云上机型内核切换为5.19后,在切换为5.10内核uname -a查询显示错误
Status: CLOSED FIXED
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: Images&Installations (show other bugs) Images&Installations
Version: 23.0
Hardware: aarch64 Linux
: P2-High S2-major
Target Milestone: beta
Assignee: xuchunmei
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-02 12:37 UTC by Banana
Modified: 2022-11-03 10:36 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Banana alibaba_cloud_group 2022-11-02 12:37:23 UTC
[问题描述]:
anolis23 arm机型内核切换为5.19后,在切换为5.10内核uname -a查询显示错误

[root@iZbp10tndzn2fahsrwa0gmZ ~]# uname -a
Linux iZbp10tndzn2fahsrwa0gmZ 5.19.0-2_rc1.an23.aarch64 #1 SMP Sun Oct 9 10:59:45 CST 2022 aarch64 GNU/Linux
[root@iZbp10tndzn2fahsrwa0gmZ ~]# grubby --default-kernel
/boot/vmlinuz-5.10.134-12.1.an23.aarch64
[root@iZbp10tndzn2fahsrwa0gmZ ~]#

[环境信息]:
机器类型:ECS
内核信息:
# uname -r
5.19.0-2_rc1.an23.aarch64

操作系统信息:
# cat /etc/os-release
NAME="Anolis OS"
VERSION="23"
ID="anolis"
VERSION_ID="23"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"

[问题发生概率]:必现

[复现步骤]:
更换指定repo源
dnf install kernel --enablerepo=Plus      下载内5.19内核
grubby --info=ALL查看所有内核信息
grubby --default-kernel										查看默认内核,为5.19
reboot																		重启让安装的内核生效
uname -r																	查看系统信息  5.19信息
grubby --default-kernel										查看此时的默认内核	5.19信息
grubby --info=ALL													查看所有内核信息	有5.10和5.19信息
grubby --set-default-index=1							启动内核修改为5.10
reboot																		重启让安装的内核生效
uname -r																	查看系统信息
grubby --default-kernel										查看此时的默认内核
对比uname -r和grubby --default-kernel的信息
注:ECS的机器异常,虚拟机正常
Comment 1 bolong_tbl alibaba_cloud_group 2022-11-02 13:57:01 UTC
x86没有该问题,仅arm存在
Comment 2 xuchunmei alibaba_cloud_group 2022-11-02 18:50:46 UTC
排查发现制作镜像过程中,修改nvme相关的启动参数时,错误地更新了/boot/efi/EFI/anolis/grub.cfg,导致无法正确识别grubenv,从而导致内核一直默认从第一个内核启动。无法切换启动其他内核。
Comment 3 xuchunmei alibaba_cloud_group 2022-11-02 19:53:06 UTC
镜像已更新
Comment 4 Banana alibaba_cloud_group 2022-11-03 10:36:10 UTC
验证通过,arm机型正常切换内核(5.10<--->5.19)