Server Read Only By "fstab" and Rescue It

As you are reading this post i can assume you are the victim of server system read-only. It happens when you messed up your fstab. But you can’t re-edit the /etc/fstab file as your system is in read-only state now. So what to do ? You need adistribution called SystemRescueCD in your system mounted. Ask your provider for this if you don’t have in your VPS/Server Panel. Better use Boot order as CD room first.

After connecting by VNC you will see below screen and you will have to select first option.

rcd-1You will be asked for keymap where you should chose default one or just press enter. Now you will see a screen like below.

rcd-2Run below command to know the exact drive which you use and became read-only.

fsarchiver probe detailed

You will see some drives information there like mine one. I installed my OS in ext4. So my OS “/” is in /dev/vda2

rcd-3

Now mount the partition with /etc/fstab in it.

mount /dev/vda2 /mnt

Your VPS drives are mounted at /mnt in SystemRescueCD live.

Now access the directory.

cd /mnt
ls /mnt

Now edit /mnt/etc/fstab with an editor according to the faults.

nano /mnt/etc/fstab

now un-mount the partition.

umount /mnt

Now just reboot the system by changing boot order to harddisk only and you will be able to access your files and folders by ssh.

Thank You.