1 |
passwd root |
1 |
reboot |
1 |
esc |
1 2 3 |
Linux16 /vmlinuz-3.10.0-229.e17x86_64 root-/dev/mapper/centos-root ro\ rd.lvm.lv-centos/root 修改后的结果为 Linux16 /vmlinuz-3.10.0-229.e17x86_64 root-/dev/mapper/centos-root rw init=/sysroot/bin/sh rd.lvm.lv-centos/root |
1 |
ro修改为 rm init=/sysroot/bin/sh |
1 |
ctrl+x |
1 |
chroot /sysroot |
1 |
passwd root |
1 |
touch /.autorelabel |
1 |
exit |
1 |
reboot |