CentOS 9 Stream
- As the system boots, press Esc to bring up the GRUB boot prompt. The prompt happens early in the boot process. If you miss the prompt, you need to restart the server from the control panel and try again.
- At the GRUB boot prompt, use the arrow keys to highlight one of the rescue kernels and press E to edit the boot options.
- Find the kernel line starting with linux.
- Change
ro
torw init=/sysroot/bin/sh
. - Press Ctrl+X or F10 to boot into single user mode.
- Press Enter to enter maintenance mode.
- Access the system with the command:
chroot /sysroot
. - Type
passwd
and follow the prompts to change the root password. - Run
touch /.autorelabel
to force file system relabeling. This is required for systems with SELinux. When you reboot the system, it will relabel the filesystem for SElinux. The reboot may take extra time during this process. - Run
exit
. - Run
reboot
to reboot the server.
No comments:
Post a Comment