First, you need to power on or reboot your Ubuntu system. You should get a grub menu as shown below. If you your os on virtualbox thenb press the ‘SHIFT’ key on the keyboard to bring up the boot menu.
![Ubuntu Grub Menu](https://www.tecmint.com/wp-content/uploads/2020/04/Ubuntu-Grub-Menu.png)
Now, press the 'e'
key to edit. This should display a screen as shown below.
![Grub Boot Parameters](https://www.tecmint.com/wp-content/uploads/2020/04/Grub-Boot-Parameters.png)
Scroll down & find the line begins with 'linux /boot/vmlinuz'
see below.
![Find Grub Boot Parameter](https://www.tecmint.com/wp-content/uploads/2020/04/Find-Grub-Boot-Parameter.jpg)
Find the text "ro quiet splash $vt_handoff"
.
![Locate Grub Boot Parameter](https://www.tecmint.com/wp-content/uploads/2020/04/Locate-Grub-Boot-Parameter.jpg)
Replace "ro quiet splash $vt_handoff"
with rw init=/bin/bash
or add it. The rw
prefix set to the root file system with read and write permission.
![Enable Root Filesystem](https://www.tecmint.com/wp-content/uploads/2020/04/Enable-Root-Filesystem.jpg)
Now, press ctrl + x
or F10
to reboot your system. Your system will boot into a root shell screen. You can confirm that the root filesystem had read and write access permission by below command.
# mount | grep -w /
You will see something like below.
![Confirm Root Filesytem Permissions](https://www.tecmint.com/wp-content/uploads/2020/04/Confirm-Root-Filesytem-Permissions.png)
To reset the root password execute the command.
# passwd
Now set a new password and confirm it. You will get a ‘password updated successfully’ notification.
![Reset Root Password in Ubuntu](https://www.tecmint.com/wp-content/uploads/2020/04/Reset-Root-Password-in-Ubuntu.jpg)
After the root password successfully changed, reboot your Ubuntu OS by this command.
# exec /sbin/init
Thank you for reading this article.
Was this helpful?
2 / 1