Correction of errors in the Ubuntu file system “The file system is read-only.

Although superior to some windows settings, but also able to spoil the mood of the user, giving an error. One of these is the inaccessibility of the file system. And it concerns both ordinary flash drives, and hard drives   in some situations. You can solve the problem. However, experienced users do not always know how to fix the error when Ubuntu issues: “ File system   read only. ” We tried to give an answer in this article.

There may be several reasons for problems with accessing files in Ubuntu.

First of all, it is worth checking whether this file system is intact. In the case of a flash card, it is easy to do. Try to open it from your computer to Windows. Another system can quickly find problems on the drive. The same goes for memory cards, chinese players   and other cheap storage media. Often it can be in them.

In the case when the problem is hDD, it will be much harder to perform the check. If you have two systems on your computer, check if your HDD is working properly on Windows. These methods will determine the source of the fault.

Formatting

In many cases, simple formatting of the file system helps to restore functionality. This is especially easy to do on a flash drive. True, we are not always ready to part with the information that is already on it. Transfer all data to a computer running Windows and format the problem drive.

With a disk, it is unlikely that someone will raise a hand to do this. Formatting can destroy a lot of important information. Moreover, if the Ubuntu file system is damaged, the problem should be looked elsewhere.


Check for errors

You can check the disk for errors not only on Windows. Ubuntu also has enough arsenal for this. This can be done with the help of commands, and using a special application. First, we analyze the method using standard tools.

View the list of drives:

Check the specific drive:

hdparm -i / dev / sdf | grep Model

In the example, sdf is taken, but your disk name may differ.

If the volume was mounted, then before checking, this action must be canceled:

Now we check volume for badblocks - problem areas:

badblocks -s / dev / sdf1\u003e / root / badblock

Progress will be displayed in percent.

Now mark the badblocks so that the system stops using them:

e2fsck -l / root / badblock / dev / sdf1

Such a method in theory should help correct problems with any kind of media. If scanning disks for errors did not help, then it's time to use the convenient utility - GParted.

GParted


  1. First you need to install this program. Make it easy with the command:
      sudo apt-get install gparted
  2. Open gparted. All media will be displayed in front of us. Among them there should be a problem inaccessible - if the utility sees errors, it will mark it with an exclamation mark.
  3. Now open our disk and click on the "Section" button located on top.
  4. In the drop-down menu, select "Check for errors." The program will scan the disk and, possibly, find problems, after which the file system will become available not only for reading.

Access rights

Finally, the last reason we lose access to managing data on media is the violation of rights. Experienced users who use the root mode may encounter it. When we use different commands, not fully understanding their essence, or launch programs with extended permissions, the system may block access by mistake.


Then we see a message from Ubuntu: "The file system is read-only." To remove such a problem will help special teams.

As a universal method, the following command is suitable:

sudo chown -R: / home /

Instead, you must enter the user name. The chown command is responsible for changing the permissions of the folder. The –R attribute means that the user can only read this section. Sudo undoes these changes. In the example, the problem was in the home section, if you have problems with a flash drive, then you should enter its directory.

The Ubuntu file system works a bit differently than on Windows. Therefore, any drives under its control behave differently. Because of this, there are new errors that can not be encountered on Windows.

Now we know how to solve the problem of disk editing problems. The case can be either in the malfunction of the device, or in the wrong definition of rights. The main thing - to correctly identify the problem and fix it. Fortunately, this is not the most serious of all errors, although it may cause the user trouble.

Like this article? Share with friends: