vSphere service console read only fstab

If you “fstabbed” yourself on a guest operating system ( CentOS 6.3 ) running in VMware, you might be in for a surprise. After you edited the fstab ( and introduced an error ) the system won’t boot anymore.

This is the setup: A host OS that is running VMware. Two guest OS’s, on CentOS 5.3 and a CentOs 6.3
One of which I am in the process of preparing to be used with ISPConfig3. While doing that, I had to edit the fstab file. I reluctantly did that, but it later showed that the entry I put there was wrong. After a reboot of the guest OS it didn’t come back. To gain access I had to use vSphere to connect to the host. In vSphere Home->Inventory->Hosts and Clusters, I could reset the guest. Of course it didn’t boot. So I right clicked on the guest and opened the Console. This is a service console what mimics a screen. Another reset and I could see the GRUB options and the system boot. This ended in an error. I could choose between CTRL-D to continue, or enter my root password. I entered the password. Now I had access to the file system. But when I tried to edit the /etc/fstab file, it threw me an error, saying the files sytem was read-only, so I could not save the changes.

After some searching I found this page:
Bypassing Bad fstab Failure While Booting Linux

I did none of what it says, but only used this command in the service console:
mount -n -o remount,rw /

Now I could open /ect/fstab for editing and I could save it. Reboot and the server was back in the air.

Hope this helps someone, because it took me a while to find out. 😛

Leave a Comment