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.
Now, press the
'e' key to edit. This should display a screen as shown below.
Scroll down & find the line begins with
'linux /boot/vmlinuz' see below.
Find the text
"ro quiet splash $vt_handoff".
"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.
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.
To reset the root password execute the command.
Now set a new password and confirm it. You will get a ‘password updated successfully’ notification.
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