centos7救援模式--rescue模式

时间:2023-03-08 20:56:14
centos7救援模式--rescue模式

前序

经典问题:系统无法进入,如grub损坏或某个配置文件改错

操作

1

按方向键到Boot,选到Hard Driver,按减号,使其下移,最终让CD-ROM Drive到第一行,并按F10保存

centos7救援模式--rescue模式

2

进入系统安装盘界面,先选Troubleshooting,再选Rescue installed system

centos7救援模式--rescue模式

centos7救援模式--rescue模式

3

进入后等待最终进入提示模式,输入 1 回车

centos7救援模式--rescue模式

4

然后输入chroot /mnt/sysimage 切换到原linux系统,切换后前缀会变为bash ,然后就可以修改root密码或配置文件了

centos7救援模式--rescue模式

5

退出并把bios 里的启动项改回为硬盘启动

输出exit然后exec /sbin/reboot

centos7救援模式--rescue模式

那么现在使用的密码就是新密码