Don't panic.
Boot to the GRUB menu. Then, press <e> (for edit) before Linux has a chance to boot.
Using your keyboard arrow keys, move the cursor down a line or so, and press <e> (for edit) again, you should now be on the kernel line, and press <End> to go out to the very end of that line. Now hit the spacebar once, if necessary, to add a space, and then add one of the folllowing:
Code: Select all
init=/bin/bash
Code: Select all
init=/bin/sh
At this point, the root file system is still mounted read-only, so enter the following command:
Code: Select all
mount -n -o remount,rw /
Code: Select all
passwd
Then restart the machine by typing:
Code: Select all
reboot