Linux之You might want to save “/run/initramfs/rdsosreport.txt“
问题现象
虚拟机突然断电造成centos8系统无法启动
Linux报You might want to save “/run/initramfs/rdsosreport.txt“ to a USB stick or /boot after mounting
问题原因
根分区的文件系统损坏导致无法进去系统,需要修复根文件系统。
处理步聚
由于已经无法进入系统,所以需要进入救援模式,进行修复操作,以下操作均在救援模式操作。
1、查找根分区位置
# ll /dev/centos/
总用量 0
lrwxrwxrwx. 1 root root 7 5月 21 09:10 home -> ../dm-2
lrwxrwxrwx. 1 root root 7 5月 21 09:10 root -> ../dm-0
lrwxrwxrwx. 1 root root 7 5月 21 09:10 swap -> ../dm-1
# ll /dev/mapper/
总用量 0
lrwxrwxrwx. 1 root root 7 5月 21 09:10 centos-home -> ../dm-2
lrwxrwxrwx. 1 root root 7 5月 21 09:10 centos-root -> ../dm-0
lrwxrwxrwx. 1 root root 7 5月 21 09:10 centos-swap -> ../dm-1
crw-------. 1 root root 10, 236 5月 21 09:10 control
lrwxrwxrwx. 1 root root 7 5月 21 09:10 datavg-data -> ../dm-3
2、修复文件系统
xfs_repair /dev/centos/root
(ext系列工具为fsck)
注意:如果报错设备busy,需要卸载设备。
xfs_repair: cannot open /dev/dm-0: Device or resource busy
umount /dev/mapper/centos-root
xfs_repair -v -L /dev/mapper/centos-root
reboot
3、激活卷组
# vgchange -a y centos
4 logical volume(s) in volume group "centos"’ now active
5、重启设备
reboot
其它命令
xfs_check /dev/sdd(盘符)
做此步之前确保分区处于umount状态,返回0表示正常
vgchange -ay 激活系统所有卷组
vgchange -ay softvg 激活卷组softvg
vgchange -a y softvg 激活卷组softvg
vgchange -an softvg 将卷组设置为非活动状态
参考和转载
https://blog.csdn.net/liuruiaaa/article/details/131449689
https://blog.csdn.net/weixin_46028840/article/details/135664954
https://blog.csdn.net/yeqiyugood/article/details/106072177
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!