Thursday, November 22, 2012

Fix a bad fstab file in CentOS

If you ever screw up your fstab file in CentOS the OS will refuse to boot. It will however allow you to enter the root password to try and fix the problem. This would be nice if the file system was mounted correctly because you could then edit the /etc/fstab file and be on your way. Alas, since the filesystem is not mounted correctly because you messed up the fstab file you can only open up files in read only mode. To fix this issue this little command and then edit your fstab file. mount -n -o remount,rw / Done! Now go grab a beer and be happy.