Debian
Restart, in the GRUB menu, set the cursor to the Debian GNU / Linux entry, and then press the e key to enter editing.

In the edit window, go to the line beginning with the linux entry. Delete the information after the parameter root = UUID = 8c132507-315c … and replace it with the following entry:
rw init=/bin/bash

After changing the parameters, press CTRL + x or F10 to start the system.
Reset root password
- Check if the file system is mounted in read / write (rw) mode.
root@(none):/# mount | grep -w /
- Enter the
passwd
command and enter the new password for the root account.
root@(none):/# passwd
- Create an automatic markup file.
root@(none):/# touch /.autorelabel
- Restart the system.
root@(none):/# exec /sbin/reboot -f

Centos
Restart, on the start screen, set the cursor to CentOS Linux, then press e and go to edit.

In the edit window, go to the line beginning with the linux entry. Delete the information after the parameter root = UUID = e35103f0-80 … and replace it with the following entry:
rw init=/bin/bash

After changing the parameters, press CTRL + x or F10 to start the system.
Reset root password
- Check if the file system is mounted in read / write (rw) mode.
root@(none):/# mount | grep -w /
- Enter the
passwd
command and enter the new password for the root account.
root@(none):/# passwd
- Create an automatic markup file.
root@(none):/# touch /.autorelabel

- Restart the system.
root@(none):/# exec /sbin/reboot -f
Ubuntu
Restart, in the GRUB menu, place the cursor on the Ubuntu project, then press e and go to edit.

In the edit window, go to the line beginning with the linux entry. Delete the information after the parameter root = UUID = 43ad24d3-ec5b … and replace it with the following entry:
rw init=/bin/bash

After changing the parameters, press CTRL + x or F10 to start the system.
Reset root password
- Check if the file system is mounted in read / write (rw) mode.
root@(none):/# mount | grep -w /
- Enter the passwd command and enter the new password of the root account.
root@(none):/# passwd

- Restart the system.
root@(none):/# exec /sbin/reboot -f
Fedora
Restart, in the GRUB menu, set the cursor to Fedora, then press e and go to edit.

In the edit window, go to the line beginning with the linux entry. After the parameter root = UUID = 45738e43-d533 … delete the information and replace it with the following entry:
rw init=/bin/bash

Reset root password
- Check if the file system is mounted in read / write (rw) mode.
root@(none):/# mount | grep -w /
- Enter the
passwd
command and enter the new password for the root account.
root@(none):/# passwd
- Restart the system.
root@(none):/# exec /sbin/reboot -f
