So you press ESC before the system boots up, to intercept it, and then you have to “edit the kernel parameters” in that menu there —
* Find the line that looks like:
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash
change it to
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash rw init=/bin/bash
when you set init=/bin/bash, you should get a PURE COMMAND LINE prompt and your fstab should be bypassed completely.
SO THEN, once you get there, your whole disk will be read only, so you have to do:
mount -o remount,rw /
This will give you read/write permission on root.
Now you can do whatever you want, like changing your root passwd.
Found this here when I was trying to find a solution for one of my friend.