Bug 5587 - [Anolis8.8][x86_64] Anolis-8-x86_64-dvd iso拉起的kvm虚拟机安装双系统使用grubby --info=ALL无法识别新增的系统grub信息
Summary: [Anolis8.8][x86_64] Anolis-8-x86_64-dvd iso拉起的kvm虚拟机安装双系统使用grubby --info=ALL无...
Status: NEW
Alias: None
Product: Anolis OS 8
Classification: Anolis OS
Component: kernel - anck-5.10 (show other bugs) kernel - anck-5.10
Version: 8.8
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: maqiao_mq
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-23 02:58 UTC by zhiqifeiyang
Modified: 2023-06-23 02:58 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zhiqifeiyang 2023-06-23 02:58:20 UTC
[背景说明]
使用Anolis-8-x86_64-dvd iso拉起kvm虚拟机,虚拟机使用的是bios启动方式,虚拟机根分区与boot分区分别是/dev/vda1与/dev/vda2,需求是将vda3 vda4分别分区格式化后,再次安装上一个anolsi23 x86 LINUX系统(即双系统场景)实现切盘启动目的。
vda3 vda4部署好了anolis23 x86 LINUX系统后使用grubby --info=ALL无法获取对应系统的grub相关信息。

[root@localhost ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.7G     0  7.7G   0% /dev
tmpfs           7.7G     0  7.7G   0% /dev/shm
tmpfs           7.7G  8.4M  7.7G   1% /run
tmpfs           7.7G     0  7.7G   0% /sys/fs/cgroup
/dev/vda1        30G  4.8G   24G  17% /
/dev/vda2       4.9G  173M  4.5G   4% /boot
tmpfs           1.6G     0  1.6G   0% /run/user/0
/dev/vda4       2.9G  161M  2.6G   6% /mnt/boot
/dev/vda3        12G  7.9G  3.3G  71% /mnt
[root@localhost ~]# ls /mnt/
a  bin  boot  check_dmesg  dev  etc  export  fs  home  lib  lib64  lost+found  media  mnt  opt  p  proc  root  run  sbin  srv  sys  tmp  usr  var

[root@localhost ~]# ls /mnt/boot/
System.map-5.10.134-147.an23.x86_64     initramfs-5.10.134-147.an23.x86_64kdump.img
config-5.10.134-147.an23.x86_64         loader
efi                                                      lost+found
grub2                                                    symvers-5.10.134-147.an23.x86_64.gz
initramfs-0-rescue-432698561ba6400e937f4027d8bde489.img  vmlinuz-0-rescue-432698561ba6400e937f4027d8bde489
initramfs-5.10.134-147.an23.x86_64.img  vmlinuz-5.10.134-147.an23.x86_64

[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found Anolis OS 23 on /dev/vda3
done
[root@localhost ~]# grubby --info=ALL  #没有anolis23的grub相关信息
index=0
kernel="/boot/vmlinuz-5.10.134-13.an8.x86_64"
args="ro rhgb quiet $tuned_params cgroup.memory=nokmem crashkernel=0M-2G:0M,2G-8G:192M,8G-:256M"
root="UUID=19eaadc4-8cb9-4e7a-b66f-5cb810946d57"
initrd="/boot/initramfs-5.10.134-13.an8.x86_64.img $tuned_initrd"
title="Anolis OS (5.10.134-13.an8.x86_64) 8"
id="72e968fab3ef4550abd3055e4344b1db-5.10.134-13.an8.x86_64"
index=1
kernel="/boot/vmlinuz-0-rescue-72e968fab3ef4550abd3055e4344b1db"
args="ro crashkernel=auto rhgb quiet"
root="UUID=19eaadc4-8cb9-4e7a-b66f-5cb810946d57"
initrd="/boot/initramfs-0-rescue-72e968fab3ef4550abd3055e4344b1db.img"
title="Anolis OS (0-rescue-72e968fab3ef4550abd3055e4344b1db) 8"
id="72e968fab3ef4550abd3055e4344b1db-0-rescue"


[环境详情]
kvm虚拟机
------------------------------------
[root@localhost ~]# cat /etc/anolis-release
Anolis OS release 8.8
[root@localhost ~]# cat /etc/os-release
NAME="Anolis OS"
VERSION="8.8"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.8"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.8"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

[root@localhost ~]# cat /proc/cmdline
BOOT_IMAGE=(hd0,msdos2)/vmlinuz-5.10.134-13.an8.x86_64 root=UUID=19eaadc4-8cb9-4e7a-b66f-5cb810946d57 ro rhgb quiet cgroup.memory=nokmem crashkernel=0M-2G:0M,2G-8G:192M,8G-:256M
[root@localhost ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.7G     0  7.7G   0% /dev
tmpfs           7.7G     0  7.7G   0% /dev/shm
tmpfs           7.7G  8.4M  7.7G   1% /run
tmpfs           7.7G     0  7.7G   0% /sys/fs/cgroup
/dev/vda1        30G  4.8G   24G  17% /
/dev/vda2       4.9G  173M  4.5G   4% /boot
tmpfs           1.6G     0  1.6G   0% /run/user/0
/dev/vda4       2.9G  161M  2.6G   6% /mnt/boot
/dev/vda3        12G  7.9G  3.3G  71% /mnt
[root@localhost ~]# free -g
              total        used        free      shared  buff/cache   available
Mem:             15           0          14           0           0          14
Swap:             0           0           0
[root@localhost ~]# lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  2
Core(s) per socket:  1
Socket(s):           2
NUMA node(s):        1
Vendor ID:           GenuineIntel
BIOS Vendor ID:      Alibaba Cloud
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
BIOS Model name:     pc-i440fx-2.1
Stepping:            4
CPU MHz:             2500.012
BogoMIPS:            5000.02
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            1024K
L3 cache:            33792K
NUMA node0 CPU(s):   0-3
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 cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti ibrs ibpb fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f rdseed adx smap avx512cd xsaveopt xsavec xgetbv1
[root@localhost ~]#
[root@localhost ~]# rpm -qa | grep grub
grub2-pc-2.02-142.0.1.an8.1.x86_64
grub2-tools-minimal-2.02-142.0.1.an8.1.x86_64
grubby-8.40-47.0.1.an8.x86_64
grub2-tools-2.02-142.0.1.an8.1.x86_64
grub2-common-2.02-142.0.1.an8.1.noarch
grub2-tools-extra-2.02-142.0.1.an8.1.x86_64
grub2-pc-modules-2.02-142.0.1.an8.1.noarch