Centos6系统、centos7系统故障排除

Centos6系统故障排除
一.MBR 丢失
覆盖MBR并重启
Centos6系统、centos7系统故障排除
进入急救模式
Centos6系统、centos7系统故障排除
对环境进行改变
Centos6系统、centos7系统故障排除
系统已经被挂到这:
Centos6系统、centos7系统故障排除
切换到根并重建MBR:
Centos6系统、centos7系统故障排除
重新启动reboot Reboot :
Centos6系统、centos7系统故障排除
二.stage2 失效
删掉stage2并重启:
[[email protected] grub]# rm stage2
[[email protected] grub]# init 6
Centos6系统、centos7系统故障排除
用光盘进行引导:
Centos6系统、centos7系统故障排除
按“+”把”CD-ROM Drive”放到最上面,然后按“F10”执行:
Centos6系统、centos7系统故障排除
进入急救模式:
Centos6系统、centos7系统故障排除
不起用网络Centos6系统、centos7系统故障排除
启动shell :
Centos6系统、centos7系统故障排除
切换到根:
Centos6系统、centos7系统故障排除
Centos6系统、centos7系统故障排除
冲本地去除器上进行引导:
Centos6系统、centos7系统故障排除
三grub.conf 丢失
删除grub.conf文件:
[[email protected] ~]# rm /boot/grub/grub.conf
rm: remove regular file `/boot/grub/grub.conf’? y
[[email protected] ~]# init 6
Centos6系统、centos7系统故障排除
vim grub.conf
Centos6系统、centos7系统故障排除
四.root 口令丢失
Centos6系统、centos7系统故障排除
按“e”进入如图:
Centos6系统、centos7系统故障排除
按“e”进入进入单用户模式
Centos6系统、centos7系统故障排除
Centos6系统、centos7系统故障排除
删除口令:
Centos6系统、centos7系统故障排除
Centos6系统、centos7系统故障排除
Centos6系统、centos7系统故障排除
centos7系统故障排除
一:root的口令丢失
重启
Centos6系统、centos7系统故障排除
按“e”键进入编辑模式
Centos6系统、centos7系统故障排除
按Ctrl+X进入继续启动
[switch_root]:/#mount -o remount,rw /sysroot #设置成可读可写
Centos6系统、centos7系统故障排除
/.autorelabel 新建
Centos6系统、centos7系统故障排除
二:MBR 丢失
覆盖MBR并重启
Centos6系统、centos7系统故障排除
关机加入可执行光盘并光盘启动
Centos6系统、centos7系统故障排除
由于我的虚拟机挂载了光盘,所以一重启就进入光盘启动的界面
Centos6系统、centos7系统故障排除
上面有三项,我们选择第三项进入troubleshooting
进入第三项后,点击第二项,进入救援模式的centos的系统
Centos6系统、centos7系统故障排除
然后我们进入如下模式:
选择1,继续进行:
Centos6系统、centos7系统故障排除
进入shell
Centos6系统、centos7系统故障排除
重新建MBR
Centos6系统、centos7系统故障排除
三:grub2 丢失
删除 grub2
[[email protected] boot]# rm -rf grub2
[[email protected] boot]# init 6
Centos6系统、centos7系统故障排除
重启:
Centos6系统、centos7系统故障排除
由于我的虚拟机挂载了光盘,所以一重启就进入光盘启动的界面
Centos6系统、centos7系统故障排除
上面有三项,我们选择第三项进入troubleshooting
进入第三项后,点击第二项,进入救援模式的centos的系统
Centos6系统、centos7系统故障排除
然后我们进入如下模式:
选择1,继续进行:
Centos6系统、centos7系统故障排除
进入shell
Centos6系统、centos7系统故障排除
Centos6系统、centos7系统故障排除