I've been operating ubuntu 18.04 for over a year. It was running smoothly until recently I ran into a problem. It keeps saying Read Only file system

When I try to cd into any directory and tap Tab for auto complete it says:

cd bash cannot create temp file for here-document: Read-only file system

I use windows-10 along with it, so when I switched back to windows it seemed to be working fine, the issue is only with ubuntu.

Okay, what I've done so far in an effort to fix this?

I tried to reboot the system and it seemed to be taking forever to reboot. So I force shutdown the system and restarted in recovery mode. There in the busybox intramfs terminal it was saying:

/dev/sda6 contains a file system with errors, check forced. Inodes that were part of a corrupted orphan linked list found. /dev/sda6 unexpected inconsistency: Run FSCK MANUALLY 
fsck exited with status code 4

Failure File system check of the root filesystem failed The root filesystem on /dev/sda6 required a manual fack

Then I ran this command: fsck.ext4 /dev/sda6 and after it's automatically fixing errors with my choosing (Y) each time it asked i rebooted the system.

It seemed to be fixed until it started saying Read-only file system again and eventually stops working. then I have to force shutdown again. NB: I have run this fsck command for several times. Each time it worked (only for a moment)

Is there any way around this to fix this. I would very much appreciate any help. Thanks.

  • 1
    A file-system flips from RW (read-write) to RO (read-only) because corruption/errors were detected, and flipping to RO prevents data loss. It is a symptom of a problem and not the cause. Firstly I'd boot a live system and check your hardware (is the disk healthy? ie. check it's SMART data; as windows working doesn't mean much as it'll be on a different part of the disk & it maybe just luck & time before windows also has problems), check RAM (windows & linux start allocating from opposite ends of your RAM so problems show differently), PSU & other things (though they tend to show on both OS) – guiverc May 6 at 10:23
  • I checked the disk with this command on windows >wmic diskdrive get status, model And it says its status OK. I've found some other ways to check the disk. So I'm gonna check all of them. Thanks for your explanation on file-system. – Imtiaz Ahmed May 6 at 13:24
  • Hi @guiverc , It would be helpful if you could spare some more time for me. I just discovered that my drive is cautious after checking the disk health with a tool called CrystalDiskInfo in Windows . It says: caution [c5] current pending sector count: 128 . The application shows the total disk size, but the drives it's showing that's been scanned excluded the partition that is being used for my Ubuntu. Does that mean the problem occurred in a sector of partition where windows resides? If the problem is with windows partition then why ubuntu partition is getting read-only ? – Imtiaz Ahmed May 6 at 16:00
  • I don't use windows 10 and older version of windows used 3rd party tools to check status... also hardware & non-Ubuntu (windows) are off-topic here. Ubuntu SMART tools are available; help.ubuntu.com/community/Smartmontools though GUI front-ends can be used too (best run from live media so drive isn't in use) – guiverc May 6 at 22:24
  • It turned out My hard drive was problematic. So I've changed it. Thanks for your time and some instructions. @guiverc – Imtiaz Ahmed May 11 at 13:59

Your Answer

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

Browse other questions tagged or ask your own question.