Stuck at FSCK but your root password is not working ?
Here is a short tutorial on how to reset root password on a Linux VPS or Dedicated Server
- First login to your VPS control panel and use VNC to access the VPS Console and if it’s a Dedicated server either use the IPMI or use a KVM to go to console of your server.
- Now let your system boot and press spare on grub menu to pause the system from booting and going at fsck prompt
- Now select the last working kernel and press ‘e’
- Now Go to the link similar to below and press ‘e’: “kernel /vmlinuz-x.x.x.x root=UUID.x.x.x.x ro rhgb quiet”
- Delete ‘ro’ from the line and append ‘init= /bin/bash’ for CentOS or ‘init= /bin/sh’ for Debian
- Press ‘Enter’ or ‘Return” key to save and the press ‘b’ to boot into single user mode
- Now the system should directly take you to your single user mode shell. Now type below command to mount the / file system in read write: mount -o remount rw /
- Once / File system is mounted, you can then change the root password with “passwd” command
- Now you can again reboot your system and run fsck using the above root password