2

Today, after several uninterrupted weeks of happily using my Ubuntu machine again, I ran into another error, this time just after okaying a typical software update. Instead of giving me a successful package installation message, it gave me some sort of notification that "the daemon that allows installation is not working". I can't remember if that was exactly it or not, but I hit "ok" and the box went away. Strange I thought.

Suspecting something was up, I immediately hooked up my external drive to make a backup -- but my drive wouldn't mount. It was visible in Nautilus, but when I clicked on it, it said: enter image description here

So apparently my file system has up and decided to go read-only. Is there a way to fix this, or must I purchase a new hard drive and start over? Is there a way to somehow mount my external drive and backup my data first? Can this somehow be fixed using fsck, a command I don't know about?

My system is set up with my / Ubuntu partition on a 250GB SSD, and my /home on a separate 500GB HDD. I believe the problem must be with my / drive, since I can still edit and save anything in my home directory as normal. I seem to be unable to edit anything on the / drive though, like install software or mount drives. Here is a screenshot of the errors I got when trying to make a backup using Aptik: enter image description here

I'm still new to computers so am rather clueless here. Any help would be really appreciated.

4

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).

  • Thanks for the advice. I will definitely try this as soon as possible. One question though, since I like to know some of what a command does: What exactly is the purpose of the -f and what does it do? – Kaleb Apr 20 at 17:43
  • ext4 writes data to the superblock on shutdown, and may erroneously write that the disk is OK. the -f option informs fsck to check the disk, even if the superblock indicates that the disk is good. fsck on an ext4 system will call e2fsck, so you can research the options with man e2fsck – Charles Green Apr 20 at 18:51
2

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.

0

I was once able to backup my R/O HDD so you should be able to mount the disk on an existing mountpoint (ie, empty directory).

Otherwise:

1) the disk is remounted R/O because there is an error, if the error is temporary, rebooting the PC will reaccess the disk R/W (after a successful fsck).

2) if the error is permanent, you may still have R/O access to the disk, and can make a last backup by booting from a LiveUSB version.

0
mount -o remount,rw /

If that doesn't work, touch /forcefsck and reboot. (If you didn't change stuff in your /etc/fstab this will automatically check all your filesystems automatically upon rebooting.)

0

Looks like you are trying to use bootable image from within your operating system, creating operational media /tmp/aptik manually. /tmp/aptik/***** may not be writable because of user permissions(there is a symlink /root/.temp/aptik --> /tmp/atik)

Then you just have to sudo it! =)

0

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
0

Let the Computer shut properly, mine had taken around 15 minutes to properly shutdown after the read only file system error. Then use sudo fsck.ext4 -f /dev/sda6 and reboot. This worked for me.

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.