First, reboot or power on your CentOS 7 system. Next, press ‘e’
on the keyboard to interrupt the boot process to make changes.
![](https://linuxmining.com/wp-content/uploads/2020/10/centos7-root-password-reset-1.png)
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.
![](https://linuxmining.com/wp-content/uploads/2020/10/centos7-rdbreak.png)
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 :
chroot /sysroot
This will change the shell to sh-4.x.
Now, change the root password.
![](https://linuxmining.com/wp-content/uploads/2020/10/centos7-chroot.png)
Now run exit command twice to Reboot the server .
Thank you for reading this article.
Was this helpful?
4 / 0
It was very helpful for me!
Thank you!
Simply wanna input that you have a very nice site, I like the style and design it really stands out.
Great post. I am facing a couple of these problems.
Remarkable! Its in fact awesome article, I have got much clear idea about from this piece of writing.
I enjoy your writing style genuinely loving this internet site.