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.