Bug 2082 - [ANCK 4.19][Anolis 8.6][ecs] 使用 kexec-tools 包中的 kexec命令的 --reuse-cmdline参数无法完整保存cmdline中的参数
Summary: [ANCK 4.19][Anolis 8.6][ecs] 使用 kexec-tools 包中的 kexec命令的 --reuse-cmdline参数无法完...
Status: NEW
Alias: None
Product: Anolis OS 8
Classification: Anolis OS
Component: BaseOS Packages (show other bugs) BaseOS Packages
Version: 8.6
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: gaochang
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-06 17:58 UTC by Janos
Modified: 2022-12-29 16:34 UTC (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janos alibaba_cloud_group 2022-09-06 17:58:19 UTC
[缺陷描述]:
 使用 kexec-tools 包中的 kexec命令的 --reuse-cmdline参数无法完整保存cmdline中的参数

[重现概率]:
必现

[重现环境]:
环境信息:云上ECS
OS:
#cat /etc/os-release
NAME="Anolis OS"
VERSION="8.6"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.6"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.6"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

内核版本: 
# uname -r
4.19.91-26.1.an8.x86_64

内存信息:
# free -h
              total        used        free      shared  buff/cache   available
Mem:          7.4Gi       190Mi       6.9Gi       0.0Ki       367Mi       7.0Gi
Swap:            0B          0B          0B


CPU信息:
#lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              2
On-line CPU(s) list: 0,1
Thread(s) per core:  2
Core(s) per socket:  1
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
BIOS Vendor ID:      Alibaba Cloud
CPU family:          6
Model:               106
Model name:          Intel(R) Xeon(R) Platinum 8369B CPU @ 2.70GHz
BIOS Model name:     pc-i440fx-2.1
Stepping:            6
CPU MHz:             2699.998
BogoMIPS:            5399.99
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           48K
L1i cache:           32K
L2 cache:            1280K
L3 cache:            49152K
NUMA node0 CPU(s):   0,1
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm arch_capabilities

RPM包版本:
# rpm -qa | grep kexec-tools
kexec-tools-2.0.21-1.3.an8.x86_64

[重现步骤]:
1、查看并记录当前cmdline
cat /proc/cmdline   
2、使用 --reuse-cmdline 参数切换内核
kexec -l /boot/vmlinuz-$(uname -r) --initrd=/boot/initramfs-$(uname -r).img --reuse-cmdline
kexec -e
3、环境重启后查看cmdline
cat /proc/cmdline

[期望结果]:
使用 kexec 的--reuse-cmdline 参数,在切换内核后可以将当前系统的cmdline内容完整保留

[实际结果]:
切换前:
# cat /proc/cmdline
BOOT_IMAGE=(hd0,msdos1)/boot/vmlinuz-4.19.91-26.1.an8.x86_64 root=UUID=d9790f8b-1457-4091-889a-109a4f446404 ro crashkernel=0M-2G:0M,2G-8G:192M,8G-:256M cryptomgr.notests cgroup.memory=nokmem rcupdate.rcu_cpu_stall_timeout=300 vring_force_dma_api rhgb quiet biosdevname=0 net.ifnames=0 console=tty0 console=ttyS0,115200n8 noibrs nvme_core.io_timeout=4294967295 nvme_core.admin_timeout=4294967295

切换后:
# cat /proc/cmdline
root=UUID=d9790f8b-1457-4091-889a-109a4f446404 ro crashkernel=0M-2G:0M,2G-8G:192M,8G-:256M cryptomgr.notests cgroup.memory=nokmem rcupdate.rcu_cpu_stall_timeout=300 vring_force_dma_api rhgb quiet biosdevname=0 net.ifnames=0 console=tty0 console=ttyS0,115200n8 noibrs nvme_core.io_timeout=4294967295 nvme_core.admin_timeout=4294967295
最前面的 BOOT_IMAGE= 这个参数被移除,请确认一下这种情况是否正常