First, reboot or power on your CentOS 8 system. Next, press
‘e’ on the keyboard to interrupt the boot process to make changes.
ro (read-only) kernel parameter as showed below.
rw and append an extra
After making the changes, press
Ctrl + X on the keyboard to enter single-user mode.
Now mount the root file system in read and write mode.
:/# chroot /sysroot
Now set your root password as you like:
:/# passwd root
Now, run the below command to enable SELinux relabelling.
:/# touch /.autorelabel
To apply the changes, exit and reboot the CentOS 8 system.
:/# exit :/# reboot
Reboot can take some times. After reboot your centos 8 system login with your new root password.
Was this helpful?
2 / 0