1.公司同事反馈jenkins没法构建,html
有一台linux虚拟机没法登录,报错信息以下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 directoryshell
因为此时系统启动不了,此时只能采用救援模式登录系统centos
2.使用救援模式(Rescue installed system)登录系统bash
因为系统是虚拟机,全部首先关闭系统后挂载镜像文件网络
启动系统,选择Rescue installed systemide
语言这里就默认选English(也能够选简体中文)post
选择链接网络this
选择模式spa
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 ...
https://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.