Linux系统紧急模式操作和重置Root密码
Linux系统紧急模式操作和重置Root密码
修复fstab分区表
1,重启时,按任意键中止启动加载
2,编辑内核,加入emergency.target
3,继续重启,ctrl+x
4,挂载/为读写,mount -o remount,rw /
5,修改/etc/fstab
6,systemd重新注册fstab,systemctl daemon-reload
7,systemctl reboot
重置root密码
1,启动时,按任意键中止启动加载
2,编辑内核,加入rd.break
3,继续重启,ctrl+x
4,重新挂载sysroot,mount -o remount,rw /sysroot
5,切换到根,chroot /sysroot
6,设置密码:echo redhat|passwd --stdin root
7,selinux重新打标 touch /.auorelabet
8,exit;exit
var code = “3a38d635-cdb2-4cb4-9ebb-aa01135f5075”

浙公网安备 33010602011771号