Remounting a read only filesystem

It happens every now and then that a linux system gets "ill" and part of the havoc that ensues presents you with the root filesystem mounted read-only. This is (as near as I can tell), some kind of defensive behavior, like a wounded dog hiding under the shed while it licks its wounds.

Often during a situation like this, you would like to edit a file (such as /etc/fstab) to fix or work around the problem. But with root mounted read-only, you are SOL (simply out of luck), without the following trick. The trick is as follows:

mount -o remount,rw /
This remounts the root filesystem read/write and you can do what you need to do. Voila!
Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org