This morning I was helping a fellow admin with a crash that occurred on a CentOS 5.8 VM. Earlier in the day, the underlying SAN hosting various VMs experienced an issue and ultimately caused some filesystem issues. Upon rebooting the server, we saw a prompt like this:
Checking filesystems / contains a file system with errors, check forced. /: Inodes that were part of a corrupted orphan linked list found. /: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) [FAILED] *** An error occurred during the file system check. *** Dropping you to a shell; the system will reboot *** when you leave the shell. Give root password for maintenance (or type Control-D to continue):
Initially, neither of us knew the root password so we tried CTRL-D (which rebooted the system).
I thought that I could reset the root password by booting into single user mode (adding the
single kernel option) but it came across the same prompt.
Eventually the other admin remembered the appropriate password and could continue on to the maintenance prompt to run fsck.
This got me to thinking though - what if we didn't remember the password? How could we bypass the login prompt and/or reset the root password under this circumstance? Is there a way to boot into single user mode and bypass the fsck check?