Why has my file-system turned read-only after updates?
I'm running 11.10 and I applied some updates. After that whenever I use my computer, I can, but only for about 2 or 3 minutes before it becomes read-only. Any sudo
command entered gives me the following error.
sudo: Can't open /var/lib/sudo/ryanmcclure/0: Read-only file system
I also use xpad
(a sticky note program) and if I edit the notes, there is never a problem until about 4 minutes later when it says that it can't write to a file because the file system is read on.
How do I solve this problem?
It sounds like you may have some file system corruption, possibly caused by a failing hard disk. (Normally this is the only way for the system to spontaneously mark the file system as read-only, to prevent further damage.) Try running:
dmesg | less
And scroll to near the bottom to see if there are errors related to your file system and disk. Look for messages about uncorrectable read or write errors (probably on sda), or file system errors (e.g. messages about ext3 or ext4 errors). If you see anything like these, you should back up any important data right away and then investigate whether the disk itself is failing (in which case you'll need to get a new one), or whether it's just a logical failure (in which case you can probably repair the file system with fsck to fix your problem).
I had the same problem, googled around and found these two links, which was useful. To me it appeared that I did not give sufficient time to umount the device. BTW my device was /dev/sdax
, which is a vfat drive.
The solution these links suggest is to run
sudo fsck.vfat /dev/sda5 -a -w
or
sudo fsck.msdos -aw /dev/sdb1
The links are:
- http://ubuntuforums.org/archive/index.php/t-1599635.html
- http://www.delodder.be/blog/linux/fat_get_cluster-invalid-cluster-chain-i_pos-0-fat-filesystem-panic-dev/
People are loving the second link, apparently.
I haven't got in the details of seeing what these cmds do, yet.
I did run both the command (aahh!!!! me), took time considerably to execute.
I then umount-ed it and then mounted it. Its working fine for me as of now(repeated the same operation which was earlier reporting read only error). Will update if I see some error. To me it appears its kind of resolved.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1063354
Pretty major bug in the wild where the HD becomes read-only. It's not your HD.
you can run restarting your pc, as this error comes due to improper mounting, unmountiong of the file system. While restarting system will ask to fix and press f, there aftre the problem should be solved