Error "File system is read only for reading" in Linux

Anonim

Error

Method 1: Adjust access rights

The first way to correct the error "File system is read-only" in Linux is to check the access rights. Sometimes the user randomly or intends to establish restrictions that apply to other users. First, we offer to check the attributes, and then make changes if required.

  1. Run the console convenient for you by the method. To do this, you can use the corresponding icon in the application menu or the hot key Ctrl + Alt + T.
  2. Starting the terminal to check the list of discs when correcting the file system is read only for reading in Linux

  3. Here enter the LS -L command to view the entire list of discs with detailed information, among which will be necessary for us.
  4. The command for outputting the list of disks when correcting the file system is read only reading in Linux

  5. Examine the attributes that are shown in the first column opposite the problem disk or partition. If there is one character -R, it means that the system is read only. The presence of W is openness to read and write.
  6. Checking the disk attributes when correcting the file system is read only to Linux reading

  7. If the problem is really associated with the specified attributes, you will have to reconfigure the rights. Enter the Sudo Chown -R [User] command: [user] / home / [user], replacing the user to the name of the desired user, to which all changes will be applied.
  8. A command to install access rights when correcting the file system is read only for reading in Linux

  9. This action is carried out with the Sudo option, so it will have to confirm, specifying a superuser password in the new line.
  10. Confirm command to install rights when fixing file system is read only reading in Linux

After activating the team, you will be notified that all changes have successfully entered into force. It is recommended to restart the PC and you can proceed to testing. If, when using the LS command, it was found that all the required attributes are installed for a partition or media, you should go to other solutions to the problem.

Method 2: Error Correction through Gparted

Gparted is one of the most famous disk management utilities in Linux with a built-in graphical interface. Its feature is the presence of many auxiliary functions related to the solution of various carrier errors.

  1. If the default gparted is missing in your distribution, install it using the sudo APT-Get Install Gparted command. Confirm this action by entering a superuser password and approved downloading archives.
  2. The command to install the disk management utility when fixing the file system is read only for reading in Linux

  3. After that, the utility is easiest to run by clicking on the appropriate icon in the application menu.
  4. Running disk management utility to solve the file system is read only reading in Linux

  5. For opening, the superuser's rights will also need.
  6. Confirmation of the launch of the Disk Management utility when solving the file system is read only for reading in Linux

  7. At the entrance, it will immediately become clear which of the sections is problematic, because an exclamation mark will be lit near it. Click on this line with the right mouse button.
  8. Search for a problem drive When solving the file system is read only for reading in Linux

  9. In the context menu, click on "Check for errors".
  10. Running an error check in the utility while fixing the file system is read only for reading in Linux

  11. Run the execution of operations by clicking the button in the form of a check mark, which is located on the top panel.
  12. Enabling the verification operation on an error in the utility when fixing the file system is read only reading in Linux

  13. Confirm the launch of the check.
  14. Confirmation of the check of checking when fixing the file system is read only reading in Linux

  15. It remains only to wait for the completion of this process.
  16. Waiting for the completion of the error check file system is read only reading in Linux

If any problems are found and fixed, you will receive an appropriate notification. At the end of the check, you should restart the PC so that at the beginning of the next session immediately check the effectiveness of the actions performed. If they did not bring any result, go further.

Method 3: Correction of damaged blocks

Sometimes an error with a failed read mode arises due to damage to the hard disk sectors. There are special utilities that allow you to distribute the problem space or correct it if it is possible. Linux has a built-in command that is responsible for performing this operation. We offer to take advantage of it if the recommendations above did not bring any result.

  1. To begin with, browse the list of disks to understand which one should be checked. This is done through the FDISK -L command.
  2. Checking the list of disks when checking the blocks during solution The file system is read only for reading in Linux

  3. In the list, find the problem drive, defining its exact name. Next, it will be required when activating the relevant team for the treatment of blocks.
  4. Finding a drive to correct the file system is read only reading in Linux

  5. Now use the HDPARM -I / DEV / SDA2 command | GREP MODEL to check the selected media or logic disk. Replace / dev / sda2 here on a certain previously defined name.
  6. Starting a drive checkup to correct the file system is read only for reading in Linux

  7. After that, unmount the disk to start checking the blocks in the future. This is done through the UMOUNT / DEV / SDA2 string.
  8. Unmounting the drive to solve the problem file system is read only reading in Linux

  9. Run the check by inserting the Badblocks -S / DEV / SDA2> / ROOT / BADBLOC command.
  10. Running the scan on bad blocks when solving the problem file system is read only for reading in Linux

  11. Detected blocks that are not subject to correction, it is required to note that the system stops them to use. To do this, use E2FSCK -L / ROOT / BADBLOCK / DEV / SDA2.
  12. Disabling problem blocks When solving the problem, the file system is read only for reading in Linux

All changes will be applied immediately, however, as usual, it is recommended to create a new operating system session to verify whether the problem has been solved with an error "File system is only readable".

Method 4: Formatting the drive

The latter method we want to tell under today's article is the most radical, since it implies the full formatting of the drive, after the status of the file system will be restored. This option is suitable only in that situation if there are no important files on the disk and all content can be deleted. Look for more detailed instructions on this topic in a separate material on our website, using the following reference.

Read more: Disk formatting in Linux

Today we disassembled the four malfunction methods "File system is read only." It remains to be found only by interacting, performing in order all the instructions given. In most cases, at least one of them turns out to be effective and allows you to completely eliminate the error considered.

Read more