I have a Ubuntu machine. I am connected to it remotely and getting the following errer:

mkdir: cannot create directory `/testFolder': Read-only file system

LIKE WINDOWS, REBOOTING the machine solved this error.

Can someone explain this behaviour to me. I am bit surprised.

  • This question is impossible to answer sensibly without knowing what file system it is about you're trying to create your testFolder on. Consider that also NTFS partitions can be accessed from a Linux-type system... – syntaxerror Dec 15 '14 at 19:42

A filesystem goes into read-only mode when it has consistency issues. It is a way to prevent possible data corruption. Your next would be to take a backup of all important data from this drive since this could also mean that the hard-drive could be on its way out.

When you rebooted the machine, the / partition got mounted back in the regular rw mode from the read-only it had gone to before rebooting.

You must run an fsck on the / partition to check for any inconsistancy. Since it is the root partition, I believe you will have to get into rescue mode to run the fsck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.