Tuesday 2 May 2017

Boot Linux OS into shell to change root password

Get access to the console. At the grub boot options edit boot line which has "kernel" string and append:
init=/bin/sh
Boot this and the Linux OS will boot to a shell. Mount / as rewrite:
mount -o remount,rw /
Change the root password:
passwd
Reboot Linux OS:
reboot