During boot, press “e” at the grub loader.
Scroll down using the arrow keys to the line starting with “linux”. It would look like this.
linux16 /vmlinuz-3.10.0……
Remove the following from that line. “rhgb” and “quiet“.
Add the following to the end of the line. “init=/bin/sh“.
Press ctrl+x to continue the boot process.
Once the system is booted, you will be at the root user in single user mode. But this is in a read only file system.
You need to mount the / filesystem.
mount -o remount, rw /
Test that you can write to /, following command should work without error.
touch /tmp/test
Now change your password for root
passwd
Touch the following file to make sure things are ok on SELinux, this is a fix file process.
touch /.autorelabel
Finally start the normal boot process.
exec /sbin/init
You’re Done.
Recent Comments