Thursday, October 18, 2012

Single user mode


Resetting root, editing /etc/fstab etc is very different in RHEL/Centos7. Here is how:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-Terminal_Menu_Editing_During_Boot.html#sec-Recovering_Root_Password

Instructions for 6.5 and earlier (Centos/RHEL 6ish)
One of your filesystems got corrupt, now your system drops into single user. You try to edit /etc/fstab to comment out the FS but cannot because / is mounted read-only. What do you do?

Sometimes your system can be stuck in an endless reboot cycle. To get out of this amusing situation, force the system into single user mode as documented here: http://www.cyberciti.biz/faq/grub-boot-into-single-user-mode/

At the prompt type in your root password (Hopefully its not "root"). Now type:

mount -n -o remount /

and you will be able to edit /etc/fstab