Read only file system

24,472

Solution 1

I had suspected this was a problem to do with my hard drive so I:

  • purchased and installed a new hard drive of the same specifications and
  • reinstalled Ubuntu 12.04 on it.

I have been running it with the new hard drive and am yet to encounter any issues.

Solution 2

I have same problem with Xubuntu 12.10. The FS suddenly and randomly become read-only. Maybe it is related to this bug:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1063354

It seems like the problem is with new kernel.

Solution 3

Had this happen on mine and seem to have it sorted, at least for the moment. Boot from an older kernel in grub, then do the update to the newest version of xubuntu again. After that, immediately restart. When grub comes around again, boot in recovery mode for the latest kernel. Choose fsck. It'll come up with a message saying it has to change the file system to read/write to continue (or something along those lines). Select yes, let it do the check, and restart. Boot up normally and it should work, did for me anyway.

One thing I should note here, don't try to just go straight to recovery without booting/updating the older kernel first. I tried that originally and it still gives you the prompt about switching to read/write but then it just refuses to run the check and crashes.

Share:
24,472

Related videos on Youtube

Jack Moon
Author by

Jack Moon

Updated on September 18, 2022

Comments

  • Jack Moon
    Jack Moon over 1 year

    I'm running Ubuntu 12.10, Upon opening any shell I get the following error:

    /home/jack/.rbenv/libexec/rbenv-init: line 87: cannot create temp file for here-document: Read-only file system
    

    I realised this wasn't simply a rbenv issue, as any file I try to write to returns an error saying the system is Read-only.

    I don't know how else to describe my problem, each time I boot up the system goes through a disk check, where it supposedly fixes several errors in my disk.

    Here is my /etc/fstab

    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    # / was on /dev/sda1 during installation
    UUID=1cc4b2ab-a984-4516-ac25-6d64f5050244 /               ext4    errors=remount-ro 0       1
    # swap was on /dev/sda5 during installation
    UUID=4e0dfeae-701a-43ce-b5c6-65f15ab3d8e3 none            swap    sw              0       0
    

    The entire file system is read-only. I've tried the following

    sudo fsck.ext4 -f /dev/sda1
    

    which gave the following (shortened) output

    /dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****
    /dev/sda1: ***** REBOOT LINUX *****
    /dev/sda1: 1257080/45268992 files (1.0% non-contiguous), 50696803/181051904 blocks
    
  • Admin
    Admin over 11 years
    Scratch that, fixed it for about a day. Problem is intermittent instead of constant since I tried it, so some improvement but still not a true fix...