How To Boot into Single-User Mode in CentOS 8 / RHEL 8
When booted into single user mode:
- Only root can login
- No password is needed
- No services are started
Single user mode is great for:
- Troubleshooting
- Resetting lost passwords
- Other common administrative tasks
Steps to boot into single user mode on RHEL 8:
- While booting, you will need to press any key once the grub menu is displayed. This will stop the system from automatically booting up.
- Select whichever boot option / kernel you want fromt he menu.
- Press ‘e’ to edit the arguments. You should now see configuration for this boot option.
- Use the arrows to move to the line that starts with ‘linux’.
- Delete the argument ‘ro’.
- Replace the deleted ‘ro’ text with this text all still on that same line:
rw init=/sysroot/bin/sh
- Press [Ctrl] - x
-
The system will now boot up into single user mode and you will see a prompt.
- Mount the root file system:
chroot /sysroot
-
Do whatever maintainence tasks you need.
-
Exit the chroot environment:
exit
Reboot the host:
reboot