linux系统奔溃后的紧急救援模式

背景:


linux系统奔溃后的紧急救援模式(init : Failed to spawn readahead-collector main process :unable to execute)

1.公司同事反馈jenkins无法构建,

有一台linux虚拟机无法登陆,报错信息如下

init: Failed to spawn readahead-collector main process: unable to execute: no such file or directory
init: Failed to spawn rcS main process: unable to execute: No such file or directory
init: Failed to spawn readahead main process: unable to execute: No such file or directory
init: Failed to spawn readahead-collector post-stop process: unable to execute: No such file or directory
init: Failed to spawn rcS post-stop process: unable to execute: No such file or directory
init: Failed to spawn kexec-disable main process: unable to execute: No such file or directory
init: Failed to spawn readahead-disable-services main process: unable to execute: No such file or directory

 

由于此时系统启动不了,此时只能采用救援模式登陆系统

2.使用救援模式(Rescue installed system)登陆系统

由于系统是虚拟机,所有首先关闭系统后挂载镜像文件

启动系统,选择Rescue installed system

语言这里就默认选English(也可以选简体中文)

 

选择连接网络

选择模式

shell  直接进入命令行, 可以进行的操作有编辑文件、修改用户密码等

fakd  诊断模式

reboot  会直接重启

这里选择shell模式

此时就进入shell模式

3.进入root环境恢复系统

   使用以下命令切换到原有的系统

   chroot /mnt/sysimage

此时报错:/bin/sh no such file or directory错误,则需要恢复系统bash环境,需要执行以下命令:

cp -r /sbin /mnt/sysimage
cp -r /bin/* /mnt/sysimage/bin/
cd /mnt/sysimage
cp -r /usr/bin/* .

   此时再重新进入

chroot /mnt/sysimage

   

   执行grub-install命令重新安装GRUB

   grub-install /dev/sda

   

   此时代表修复成功了,重启系统(按理此时可以正常进入系统,可是我这边还是无法进入系统,此问题留待后续解决吧

   由于此时是联网的,可以将重要文件拷贝(scp)到其他机器上

   

   至此系统还没有恢复,只能通过网络拷贝文件



参考:https://www.cnblogs.com/Yongzhouunknown/p/9397097.html


init : Failed to spawn readahead-collector main process :unable to execute ...

http://blog.51cto.com/11627433/1922007

http://www.bubuko.com/infodetail-2053034.html


centos6单用户模式:卡不动按F5:

https://blog.csdn.net/AhhSong/article/details/77073733

centos6.5系统详细使用救援模式:

https://jingyan.baidu.com/article/4f34706e07fa5ce387b56dcc.html


linux系统奔溃后的紧急救援模式(init : Failed to spawn readahead-collector main process :unable to execute)

https://www.cnblogs.com/Yongzhouunknown/p/9397097.html



Greetings.

anaconda installer init version 13.21.254 starting

mounting /proc filesystem... failed.

I can't recover from this.



猜你喜欢

转载自blog.51cto.com/sandshell/2296442