406 Star 1.5K Fork 1.4K

GVPopenEuler/kernel

 / 详情

【22.03-RC5】【arm/x86】安装kernel-rt后重启,系统无法启动

已验收
缺陷
创建于  
2022-03-28 17:32

【环境信息】
系统:x86_64/aarch64物理机
处理器:鲲鹏920
OS版本:22.03-RC5
repo:OS、everything
【问题复现步骤】
1、配置好对应的repo源
2、安装yum -y install kernel-rt
3、重启reboot
【预期结果】
安装后可重启成功
【实际结果】
安装后重启,无法进入系统
输入图片说明

评论 (7)

suhang 创建了缺陷

Hi suhangself, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers: @YangYingliang , @pi3orama , @成坚 (CHENG Jian) , @jiaoff , @Qiuuuuu , @zhengzengkai , @Xie XiuQi

openeuler-ci-bot 添加了
 
sig/Kernel
标签
suhang 优先级设置为严重
suhang 计划截止日期设置为2022-03-29
suhang 计划开始日期设置为2022-03-28

[ 10.046840][ T768] usb 5-1: Manufacturer: Generic
[ 10.088991][ T768] hub 5-1:1.0: USB hub found
[ 10.089517][ T768] hub 5-1:1.0: 4 ports detected
[ 10.135313][ T911] usb 1-1.1: New USB device found, idVendor=12d1, idProduct=0003, bcdDevice= 1.00
[ 10.135316][ T911] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 10.135318][ T911] usb 1-1.1: Product: Keyboard/Mouse KVM 1.1.0
[ 10.151202][ T911] input: Keyboard/Mouse KVM 1.1.0 as /devices/pci0000:7a/0000:7a:01.0/usb1/1-1/1-1.1/1-1.1:1.0/0003:12D1:0003.0001/input/input1
[ 10.170564][ T19] usb 6-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[ 10.198861][ T19] usb 6-1: New USB device found, idVendor=0bda, idProduct=0411, bcdDevice= 1.01
[ 10.198864][ T19] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 10.198865][ T19] usb 6-1: Product: 4-Port USB 3.1 Hub
[ 10.198867][ T19] usb 6-1: Manufacturer: Generic
[ 10.210608][ T911] hid-generic 0003:12D1:0003.0001: input,hidraw0: USB HID v1.10 Keyboard [Keyboard/Mouse KVM 1.1.0] on usb-0000:7a:01.0-1.1/input0
[ 10.219339][ T19] hub 6-1:1.0: USB hub found
[ 10.220078][ T19] hub 6-1:1.0: 4 ports detected
[ 10.220990][ T911] input: Keyboard/Mouse KVM 1.1.0 as /devices/pci0000:7a/0000:7a:01.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:12D1:0003.0002/input/input2
[ 10.221098][ T911] hid-generic 0003:12D1:0003.0002: input,hidraw1: USB HID v1.10 Mouse [Keyboard/Mouse KVM 1.1.0] on usb-0000:7a:01.0-1.1/input1
[ 10.221747][ T1] md: Waiting for all devices to be available before autodetect
[ 10.221750][ T1] md: If you don't use raid, use raid=noautodetect
[ 10.221769][ T1] md: Autodetecting RAID arrays.
[ 10.221770][ T1] md: autorun ...
[ 10.221771][ T1] md: ... autorun DONE.
[ 10.221843][ T1] List of all partitions:
[ 10.221844][ T1] No filesystem could mount root, tried:
[ 10.221845][ T1]
[ 10.221845][ T1] Kernel panic - not syncing:
[ 10.221846][ T1] VFS: Unable to mount root fs on unknown-block(0,0)
[ 10.221848][ T1] CPU: 12 PID: 1 Comm: swapper/0 Not tainted 5.10.0-60.17.0.rt62.49.oe1.aarch64-rt62 #1
[ 10.221851][ T1] Hardware name: Huawei TaiShan 200 (Model 2280)/BC82AMDDA, BIOS 1.77 06/28/2021
[ 10.221852][ T1] Call trace:
[ 10.221853][ T1] dump_backtrace+0x0/0x1e4
[ 10.221857][ T1] show_stack+0x20/0x2c
[ 10.221858][ T1] dump_stack+0xd0/0x134
[ 10.221861][ T1] panic+0xd4/0x3c8
[ 10.221864][ T1] mount_block_root+0x1d8/0x20c
[ 10.221868][ T1] mount_root+0x78/0x88
[ 10.221870][ T1] prepare_namespace+0x13c/0x1b4
[ 10.221872][ T1] kernel_init_freeable+0x178/0x1d8
[ 10.221874][ T1] kernel_init+0x1c/0x130
[ 10.221876][ T1] ret_from_fork+0x10/0x18
[ 10.721955][ T1] SMP: stopping secondary CPUs
[ 10.726571][ T1] Kernel Offset: disabled
[ 10.730736][ T1] CPU features: 0x0000,88000002,2a208838
[ 10.736198][ T1] Memory Limit: none
[ 10.739932][ T1] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

No filesystem could mount root,无可挂载root的文件系统,

zhengzengkai 任务状态待办的 修改为修复中

[ 12.138244][ T1] systemd[1]: Reached target Swaps.
[ 12.235194][ T1] systemd[1]: Reached target Timer Units.
[ 12.294260][ T1] systemd[1]: Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journa[ 12.323735][ T1] systemd[1]: Listening on Journal Socket.
l Socket.
[ OK ] Listening on udev C[ 12.343754][ T1] systemd[1]: Listening on udev Control Socket.
ontrol Socket.
[ OK ] Listening on udev K[ 12.363700][ T1] systemd[1]: Listening on udev Kernel Socket.
ernel Socket.
[ OK ] Reached target Sock[ 12.383592][ T1] systemd[1]: Reached target Socket Units.
et Units.
[ 12.403634][ T1] systemd[1]: Condition check resulted in Create List of Static Device Nodes being skipped.
[ OK 12.486336][ T1] systemd[1]: Started Hardware RNG Entropy Gatherer Daemon.
0m] Started Hardware RNG Entropy Gatherer Daemon.
Startin[ 12.507945][ T1] systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
g Journ[ 12.507950][ T1] systemd[1]: (This warning is only shown for the first unit using IP firewalling.)
al Service..[ 12.510190][ T1] systemd[1]: Starting Journal Service...
.
Starting Load Kernel Modules 12.559769][ T1] systemd[1]: Starting Load Kernel Modules...
0m...
Starting Creat[ 12.582056][ T1] systemd[1]: Starting Create Static Device Nodes in /dev...
e Static Device Nodes in /dev...
Starting Setup[ 12.605848][ T1] systemd[1]: Starting Setup Virtual Console...
Virtual Console...
[ OK ] Started Journal Ser[ 12.632415][ T1] systemd[1]: Started Journal Service.
vice.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[ OK ] Finished Create Static Device Nodes in /dev.
[ OK ] Finished Setup Virtual Console.
Starting dracut cmdline hook...
Starting Apply Kernel Variables...
Starting Create Volatile Files and Directories...
[ OK ] Finished Create Volatile Files and Directories.
[ OK ] Finished Apply Kernel Variables.
[ OK ] Finished dracut cmdline hook.
Starting dracut pre-udev hook...
[ 12.666523] dracut-pre-udev[1206]: modprobe: FATAL: Module dm_mod not found in directory /lib/modules/5.10.0-60.17.0.rt62.49.oe1.aarch64-rt62
[ OK ] Finished dracut pre-udev hook.
Starting Rule-based Manage…for Device Events and Files...
[ OK ] Started Rule-based Manager for Device Events and Files.
Starting Coldplug All udev Devices...
[ OK ] Finished Coldplug All udev Devices.
[ OK ] Reached target System Initialization.
Starting dracut initqueue hook...
Starting Show Plymouth Boot Screen...
[ OK ] Started Show Plymouth Boot Screen.
[ OK ] Started Forward Password R…s to Plymouth Directory Watch.
[ OK ] Reached target Path Units.
[ OK ] Reached target Basic System.

dracut-pre-udev[1206]: modprobe: FATAL: Module dm_mod not found in directory /lib/modules/5.10.0-60.17.0.rt62.49.oe1.aarch64-rt62
定位原因为:kernel-rt内核构建前打上的RT补丁中增加了localversion-rt文件
-diff --git a/localversion-rt b/localversion-rt
-new file mode 100644
-index 000000000..40d81d8e6
---- /dev/null
-+++ b/localversion-rt
-@@ -0,0 +1 @@
-+-rt62
导致构建(make)出的kernel-rt rpm中镜像路径名有-r62后缀,
导致modprobe执行失败,dm_mod安装不上,kernel-rt内核启动失败

是的,确实由于 scripts/setlocalversion 脚本会读取localversion-rt文件内容添加-rt62

linux-5.10.0-60.18.0.rt62.51.aarch64# make kernelrelease
5.10.0-60.18.0.rt62.51.aarch64-rt62

由于编译 kernel-rt.spec 时没有配置 KERNELRELEASE

make ARCH=%{Arch} openeuler_defconfig

TargetImage=$(basename $(make -s image_name))

make ARCH=%{Arch} $TargetImage %{?_smp_mflags}
make ARCH=%{Arch} modules %{?_smp_mflags}

没有配置 KERNELRELEASE,使用 make -j`nproc`编译后,模块信息带有-rt62

linux-5.10.0-60.18.0.rt62.51.aarch64# modinfo ./drivers/media/dvb-frontends/lg2160.ko
filename:       /home/myk/rpmbuild/BUILD/kernel-5.10.0/linux-5.10.0-60.18.0.rt62.51.aarch64/./drivers/media/dvb-frontends/lg2160.ko
version:        0.3
license:        GPL
author:         Michael Krufky <mkrufky@linuxtv.org>
description:    LG Electronics LG216x ATSC/MH Demodulator Driver
srcversion:     436B46C148817BBE6B6C623
depends:        
intree:         Y
name:           lg2160
vermagic:       5.10.0-60.18.0.rt62.51.aarch64-rt62 SMP preempt_rt mod_unload modversions aarch64
parm:           debug:set debug level (info=1, reg=2 (or-able)) (int)

加上 KERNELRELEASE,使用 make KERNELRELEASE=5.10.0-60.18.0.rt62.51.aarch64 -j`nproc`编译后,模块信息没有-rt62

linux-5.10.0-60.18.0.rt62.51.aarch64# modinfo ./drivers/media/dvb-frontends/lg2160.ko
filename:       /home/myk/rpmbuild/BUILD/kernel-5.10.0/linux-5.10.0-60.18.0.rt62.51.aarch64/./drivers/media/dvb-frontends/lg2160.ko
version:        0.3
license:        GPL
author:         Michael Krufky <mkrufky@linuxtv.org>
description:    LG Electronics LG216x ATSC/MH Demodulator Driver
srcversion:     436B46C148817BBE6B6C623
depends:        
intree:         Y
name:           lg2160
vermagic:       5.10.0-60.18.0.rt62.51.aarch64 SMP preempt_rt mod_unload modversions aarch64
parm:           debug:set debug level (info=1, reg=2 (or-able)) (int)

树莓派编译添加KERNELRELEASE配置,所以没有出现kernel-rt类似问题

%build
cd linux-%{KernelVer}

perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}.raspi.%{_target_cpu}/" Makefile

make ARCH=%{Arch} %{?_smp_mflags} bcm2711_defconfig

make ARCH=%{Arch} %{?_smp_mflags} KERNELRELEASE=%{KernelVer}

去掉localversion-rt文件 PR 已提交。

suhang 任务状态已完成 修改为已验收

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(4)
5329419 openeuler ci bot 1632792936 9214726 zhangyh1992 1681867353
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助

A270a887 8829481 3d7a4017 8829481