Bug 12385 - 无法从mdadm分区启动系统
Summary: 无法从mdadm分区启动系统
Status: RESOLVED INVALID
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: BaseOS Modules (show other bugs) BaseOS Modules
Version: 23.1
Hardware: x86_64 Linux
: P3-Medium S1-blocker
Target Milestone: ---
Assignee: happy_orange
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-15 00:33 UTC by yjsnpi114514
Modified: 2024-12-15 23:53 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 yjsnpi114514 2024-12-15 00:33:54 UTC
Description of problem:
在某个mdadm分区上安装龙蜥23.1系统之后,无法启动,原因是卡在寻找mdadm根分区这一步上。

Version-Release number of selected component (if applicable):
grub2-common-1:2.12-8.an23.noarch                                                                                                                                                                                                                                                                                                               Grub2-efi-x64-1:2.12-8.an23.x86_64                                                                                                                                                            shim-x64-15.8-1.an23.x86_64                                                                                                                                                                

Steps to Reproduce:
1. 开机,显示GRUB菜单后按“c”进入命令行界面。
2. 输入ls命令,里面显示有(md/0)分区。
3. 输入
grub> set root=(md/0)
grub> linux /boot/vmlinuz-xxxxxxxx(省略具体文件名) root=/dev/md0
grub> initrd /boot/initramfs-xxxxxxxx(省略具体文件名)
grub> boot

Actual results:
卡在寻找/dev/md0这一步上。

Expected results:
既然grub能识别/dev/md0上的文件,应该正常进入/dev/md0上的系统才对。

Additional info:
Comment 1 yjsnpi114514 2024-12-15 23:53:04 UTC
在 /etc/default/grub 的 GRUB_CMDLINE_LINUX 项中加入
rd.auto rd.md=1 rd.md.conf=1
后,问题得到解决。

根据 https://man7.org/linux/man-pages/man7/dracut.cmdline.7.html 的资料,Linux默认启动时,是不会主动组装任何mdadm分区的,必须自己手动启用。