Solution to the error "Read-only file system"

Solution to the "Read-only file system" error

El encounter errors while using your distribution favorite can be not only a pain in the chest, but a headache when you have no idea what's going on and why it is happening to you.

Although this "Read-only file system" message has already happened to me several times, causing me to lose my head and, above all, I ended up having to reinstall my entire system, because when performing some activity through the terminal, it displays this message.

The first thing we proceed to do is restart the computer, which leads us to the fact that when we start it, the system simply does not start the graphical server and we receive the famous black screen:

"BusyBox v* multi-call binary 

(initramfs)" 

Where many end up deserting and reinstalling the system.

But what we must do is avoid restarting the system, This is the most recommended because while we are inside, as the message indicates, the system is only in read mode so we cannot record anything in the system.

The problem

The first step is to try to identify the error and search the network while we are inside the system, it is easier and above all to try to remember what led us to it.

Although the most common thing you can find on the net, is that the system protects itselfSince the disk you are using is no longer optimal for storing data.

What it turns out is that it only goes into read mode so it only allows us to access the data, but without instead it does not allow us to make changes within it.

For me, this is unusual, because I have only been with a new disk for a few weeks and reviewing the SMART data and sectors, it is not possible that it is already in bad condition.

Since personally I did not agree that my disk was already in the last, the first thing I decided to do is to clean my hardware, for that of some particle that is interfering with its operation.

I started my team again and I got the same result.

Ubuntu error

Solutions

The next thing I did was change disk cablesIn my case SATA, I have known that the classic red cables tend to be damaged very quickly either by high temperatures or by some doubles.

This solution was useful to me.

In another case it is at the software level so we have to do is identify which is the partition that happened to "Read-only file system".

In the best of cases, if it is a different partition than where your system is located, you have the upper hand, since you have the facility to be able to mount and unmount said partition without problems.

For this We can use the terminal and execute the following commands, where we will first identify the partition's mount point and then proceed to remount it with read and write permissions:

sudo fdisk -l 

Once the partition is identified, we remount it, where / sdXx will be the mount point, it can be / sdb1 or / sdc, etc.

mount -o remount,rw /dev/sdXx 

Si your system partition was the one that was protected, applying this command will not work for you, so we must apply the following:

mount -o remount / 

If you keep getting the same error, we can choose to run the following:

sudo fsck -Af -M 
sudo reboot

What it will do is check file system and try to make the corresponding corrections.

Here we must write down the blocks that are going to unfold us that have errors, in my case I display something like this:

Free blocks count wrong for group #190 (102254, counted=102258). Fix? yes
Free blocks count wrong for group #629 (1558554, counted=1558555). 
Fix? yes Free blocks count wrong for group #1558658    
Fix? Yes 

Where we will try to repair them:

sudo fsck -b 102254 /dev/sda1 -y 

In the latter case, we must access the advanced options of our system from GRUB and perform an fsck.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Rodolfo said

    Thank you. You saved me because I thought I had lost everything I had on the Apache server. I changed the disk cable and it started everything fine. The bad habit of not backing up to another computer.

  2.   Frank Dominguez said

    I am new to linux and had problems working in the other partitions, thanks it was very useful, now I can continue.

  3.   Manuel Ramos said

    Thanks, it is a headache to have these problems and more so when you are new to Linux. Now I can continue using my computer

  4.   Samuel Colque Flores said

    Thank you very much for this content. God bless you.