Pages

Unixbhaskar's Blog

Thursday, February 20, 2014

How to fix "Read-only" root file system


This happened on Ubuntu 13.10.

Okay, I recently encounter it in one of my OS's installed in my laptop...there are many of them ..this is on Ubuntu...

After booting( I am accessing this partition after month or two!) it works fine for few minutes then all of a sudden it went back to Read-Only mode and that too root fs...irk...real irk...:(

So, I was doing an update to that OS after a while as I said..and it bug me twice..so started to hunt down that problem.I started to look around different aspect of fs and finally look at fstab..and it was little different then I thought.

The root fs was has the parameter of "on-error=errors=remount-ro" and which is missing the "defaults" option. Okay, what's the big deal with that "defaults" option..very big deal indeed.Please check out the mount man page to find out more about that option.

From the man pages of mount:

defaults
Use default options: rw, suid, dev, exec, auto, nouser, and async.


Now , I hope you understand why :)


But why the hell it was missing from the option in fstab file ...I was wondering..probably last update?or something else?Because I haven't had change anything in that file IIRC...or ...let me know if you believe and prof of something else doing that ..

Mind you, I have done two round of fsck after being hit by that to bring down that os and do it from other os partition.And the fsck fixed up few more thing..but still it was happening...so adding that options is simple and worked for me.

Hope this will help.

Cheers!
Bhaskar