1.在启动页面按 e 进入编辑模式
2.将光标移动到 linux 开头行,按End ,写 rd.break,然后按ctrl+x进入swtch_root 模式
3.运行命令 mount -o remount,rw /sysroot 重新挂载根分区
4.运行命令 chroot /sysroot 切换根分区
5.开始设置密码,运行命令: passwd root
6.创建文件: touch /.autorelabel
7.运行命令 exit 重启环境 reboot ,等待就好了
1.在启动页面按 e 进入编辑模式
2.将光标移动到 linux 开头行,按End ,写 rd.break,然后按ctrl+x进入swtch_root 模式
3.运行命令 mount -o remount,rw /sysroot 重新挂载根分区
4.运行命令 chroot /sysroot 切换根分区
5.开始设置密码,运行命令: passwd root
6.创建文件: touch /.autorelabel
7.运行命令 exit 重启环境 reboot ,等待就好了