Frequent "Read Only Filesystem" error

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
_Sirius_
Level 1
Level 1
Posts: 2
Joined: Fri Jan 21, 2022 3:06 am

Frequent "Read Only Filesystem" error

Post by _Sirius_ »

For the last couple of days, I've been getting frequent "Read only filesystem" errors while using my laptop. It used to happen once every 2-3 days earlier but for the last couple of days it happens every couple of hours. I would be using my laptop for regular tasks or gaming and suddenly a popup would appear with this error, I also notice that the system would freeze several times for a couple of seconds when this error appears.

Whenever this happened, I would restart my system and would get a black screen with the initramfs prompt, where I would enter "fsck /dev/sda2 -y" and run it and that fixes the system almost everytime but the error returns after sometime.

Is there a way to permanently fix this? or would I have to replace the drive?
I'm attaching several screenshots, please let me know if you need any more information to provide help.
Here is the screenshot of Gnome Disks application and SMART screen.

Image

Image
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
deepakdeshp
Level 20
Level 20
Posts: 12334
Joined: Sun Aug 09, 2015 10:00 am

Re: Frequent "Read Only Filesystem" error

Post by deepakdeshp »

If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Frequent "Read Only Filesystem" error

Post by rene »

Your drive is dying: SMART attribute 5, reallocated sector count, is at 9800. There's a possibility that you can sort of salvage it by running it through a so-called "ATA secure erase" as that'll test and retire sectors as needed potentially leaving you with remaining sectors that may be considered good, but chances are slim; drives have an internal pool of reserve sectors and once bad sectors actually start showing up externally such as for you usually it gets worse rapidly; for example as a matter of a wobbly spindle.

In any case also a secure erase would mean fully emptying the drive i.e. losing your current system. Feel free to ask if interested but it's then really otherwise time for backup and replacement --- which seems a great opportunity anyway to go with an SSD.
_Sirius_
Level 1
Level 1
Posts: 2
Joined: Fri Jan 21, 2022 3:06 am

Re: Frequent "Read Only Filesystem" error

Post by _Sirius_ »

Hey @rene , I am interested in "ATA secure erase" as I am not in position to replace the drive for atleast a month, can you please guide me through the steps?
Thank you.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Frequent "Read Only Filesystem" error

Post by rene »

Noting again that this leaves your drive completely erased; all partitions, including any potentially non-Linux ones. Back up all that needs backing up.

Then make sure the system is plugged in: you don't want to loose power halfway through a secure erase. Boot from f.e. the Linux Mint Live USB/DVD, open a terminal and run

Code: Select all

sudo hdparm -I /dev/sda | less
Verify from the displayed model number that you are looking at your TOSHIBA MQ04ABF100 and if indeed, scroll to the end of the output with Shift-G. You should have something like

Code: Select all

Security: 
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        200min for SECURITY ERASE UNIT. 200min for ENHANCED SECURITY ERASE UNIT.
If you see frozen rather than not frozen your BIOS has locked out the functionality which we need to regain by power-cycling the drive; exit less with q. If indeed we need to power-cycle, suspend to RAM with

Code: Select all

sudo sh -c "echo -n mem >/sys/power/state"
and wake the system up again, normally via the power-button. Repeating the sudo hdparm -I /dev/sda should now show not frozen. If indeed,

Code: Select all

sudo hdparm --security-set-pass password /dev/sda
should complete without error. That "password" can be literal "password"; will be unset again automatically anyway by the secure erase. The next step will then actually secure-erase the drive: this will take approximately the time hdparm showed you; expect 3+ hours for a 1T HDD. No output is produced while it's running: you just wait.

Code: Select all

sudo hdparm --security-erase password /dev/sda
When it's done. i.e., after you have your prompt back after 3+ hours, verify from another sudo hdparm -I /dev/sda that indeed the password is not enabled as per that above display.

Assuming that's all fine you now have a fully empty drive. Please reboot, and again into the Live system, so as to reinstall. If it didn't work to remedy things chances seem fair that you'd find trouble again already while reinstalling --- but even if you do not there's no guarantees that the issue won't again return. Your drive is as said very likely to simply be dying.
deepakdeshp
Level 20
Level 20
Posts: 12334
Joined: Sun Aug 09, 2015 10:00 am

Re: Frequent "Read Only Filesystem" error

Post by deepakdeshp »

You can use Clonezilla to backup your drive skipping the bad sector s. -rescue is the CZ flag. It will backup only the good sectors . Good luck.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
Locked

Return to “Storage”