Error in /etc/fstab stopping Linux boot

In Linux, there are times when you need to edit your /etc/fstab file to add a new disk. Sometimes, you may accidentally edit the wrong information which will cause Linux to not boot. Usually though, Linux plays nice and boots to a command prompt. Unfortunately, you are now booted into a read-only filesystem so you are unable to save your /etc/fstab.

What you need to do is first set the operating system to read/write (r/w). To do this run the following command:

>mount -o remount,rw /

If /etc is on a different volume, then run this command (replace /dev/sda1 with your /etc volume):

>mount -t ext3 /dev/sda1 / -o remount,rw

Some people have complained about kernels that are not compiled to support the reldiratime option. If you are still having trouble editing and saving /etc/fstab, try this:

>mount -o remount,defaults /

You should now be able to edit and save your /etc/fstab file and reboot and have Linux back again!