First, reboot or power on your CentOS 7 system. Next, press
‘e’ on the keyboard to interrupt the boot process to make changes.
After pressing “e“, scroll down to linux16 line and add rd.break parameter at the end of line. The Linux16 line will be linuxefi on the UEFI system.
Now, press Ctrl+x to boot with changed parameters. rd.break breaks the boot process at initramfs.
Once the system boots up the switch_root prompt will appear.
Remount the read-only file system to read & write permission by below command :
mount -o remount,rw /sysroot
Change shell to file-system’s root by below command :
This will change the shell to sh-4.x.
Now, change the root password.
Now run exit command twice to Reboot the server .
Thank you for reading this article.
Was this helpful?
1 / 0