Restart your computer and wait for GRUB. Press Esc to pick from a list of kernels, then type 'e' to edit it.
Scroll down in the showed list until you find something that looks like this:
kernel /vmlinuz-x.x.x-x.x ro root=/dev/...When you find it, type "e" to edit it.
Add at the end of the line(make sure you insert the space at the beginning) the following:
init=/bin/bash. Press enter and then type "b" to boot.Now your system starts in text mode and then you'll get bash. Type mount in order to see the name of the mount. (It should be something like: /dev/sda1)
Remount the file device typing:
mount -o remount,rw /dev/sda1 / (/dev/sda1 is your device)Now, you're ready to change your password simply typing:
passwd and typing two times anew password.Reboot the computer.
Enjoy, you have a new root password in your system!
