How to fix read-only file-system on 18.04

I know there's a good answer out there, but I'm having trouble finding it right at the moment.

Your system has by default, a line in /etc/fstab which indicates that if there is an error in the file system, that it should go into read-only mode, to prevent further corruption or dataloss.

The way to fix this, is to boot from a live USB, open a terminal window and use the command

sudo fsck -f /dev/sdxx

where "sdxx" is the partition of the hard drive that Linux resides on. You could use lsblk to determine the partition name, if you don't know it.

You could also copy your data to a backup hard drive before performing the disk check - the live USB should allow you to mount both your USB backup disk, and the partition that is having the problem (in read-only mode).


Normally the mounted disk filesystem becomes read-only when the server or pc is not shutdown correctly. I had the same issue with my ubuntu server. I ran the following command to run fsck and it fixed it.

sudo fsck.ext4 -f /dev/sda1

You have to press y for everything and reboot after its done. and it works.


Go to the terminal and enter the following command and read-only problems in Ubuntu 18.04 LTS will be gone:

sudo ntfsfix /dev/your_drive

Don't forget to unmount the read-only drives and restart Ubuntu. Your drive addresses can be found by using:

sudo fdisk -l