Ever since following this tutorial to migrate my sistem from my HDD to my SSD I have been getting an intermittent error where running any command I get something like this:

sudo: unable to open /var/lib/sudo/foo/0: Read-only file system
sudo: unable to execute /sbin/fsck: Input/output error

And the only way I can fix it is by hard rebooting my machine.

This used to happen ruffly once every two weeks and I have no idea why.

Now it happens every Sunday at ~8:00 am.

I really have no idea where to start when debugging this issue any tips would be greatly appreciated. I have done tests on my RAM and on my SDD but nothing seems to be untoward to me. I am sorry for such an open ended question but I am desperate to solve this issue ASAP.


Replaced the 2010 sandisk SSD and hasn't happened since. Moral of the story - don't buy old SSDs on eBay :)

  • any info in /var/log/ that might help?
    – Rinzwind
    Jun 7, 2016 at 15:59
  • Nothing obvious no.
    – maxisme
    Jun 7, 2016 at 16:05
  • If it's on a regular time interval, I'd start poking around cron, perhaps there's some script with a typo in there. When it goes RO, does mount show that it's read only? If so, it was (re)mounted that way (autofs perhaps), if not, then it might be the ssd drivers. Have you tried updating your system?
    – Tim S.
    Jun 7, 2016 at 16:25
  • Same here, but with FAT32?
    – fosslinux
    Jun 8, 2016 at 1:18
  • 1
    @AndroidDev I am 200 miles away from my server
    – maxisme
    Mar 8, 2017 at 14:57

2 Answers 2


You can try to force a check of all file systems skipping mounted ones with the -M option

 sudo fsck -Af -M 

If it fails perhaps you can try for ext4 filesystems

 sudo fsck.ext4 -f /dev/sda1 > fsck-output.txt

You can change to ext3 depending on your filesystem type.

The Recommended filesystem for Linux systems would be EXT4 with TRIM intended to improve performance through reduced write cycles to the SSD drive given the limited write-rewrite cycles.

Check for output in the fsck-output.txt file for any errors or use dmesg to get any errors not printed on screen and let me know how it goes.

Regards Douglas and hope it works out.

  • Thank you! It returns fsck.ext4: Unable to resolve ... which is the main ssd drive!?
    – maxisme
    Jun 8, 2016 at 13:40
  • what file system are you running?
    – Zuko
    Jun 8, 2016 at 13:41
  • running ext4 just ran blkid and the ssd uuid is completely different. How come it still works haha?
    – maxisme
    Jun 8, 2016 at 13:47
  • they have to be the same
    – Zuko
    Jun 8, 2016 at 13:53
  • I know but how are they still working if they are not?
    – maxisme
    Jun 8, 2016 at 13:54

Since this error started with the new SSD, I'd recommend checking the connection. If the disk is connected via SATA, that means both ends of the cable: Unplug and plug in again.

If the problem does not disappear, I'd recommend checking the SSD itself with whatever you have available. There might be some low-level tools from the manufacturer, there might be some data in the SMART logs.

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.