Home Linux Mint How to Repair File System Errors in Linux Mint

How to Repair File System Errors in Linux Mint

Using Linux Mint makes Linux a user-friendly operating system environment for all the right reasons. Whether you are interested in gaming, multimedia, graphic design, or improving your productivity, Linux Mint is fully equipped with all the apps you might need. It is a user-centered and community-centric Linux distribution.

The Linux Mint community and its development team have a great bond that turns user feedback into prime system updates and bug fixes. On top of being open-source, Linux Mint is famed for low memory usage and feature-rich software sources.

Linux Mint File System Errors

All these benefits of using Linux Mint as your default Linux operating system distribution come at the cost of being able to overcome one major hurdle; file system errors.

File system errors occur when we can’t control OS-related behaviors like hardware failures, improper startup procedures, and NFS write errors. The outcome of such OS-related behaviors is lagging or reduced performance and efficiency of the Linux operating system.

Repairing File System Errors in Linux Mint

To repair file system errors in Linux Mint, you need to use an FSCK terminal-based utility, which is used to identify and resolve file system errors.

The standard usage syntax for FSCK looks like the following.

# fsck [COMMAND_OPTIONS] [TARGETED_FILESYSTEM]

To use FSCK, ensure you are a root user or have Sudoer privileges on the system. There are some important FSCK rules to follow:

  • Identify the partitions you are interested in repairing via the command fdisk -l.
  • Use the command syntax umount /dev/sdx to unmount the targeted filesystem partition for repair.
  • Perform a filesystem partition repair with the command fsck -p on the unmounted partition /dev/sdx.
  • Remount the repaired filesystem partition.

Repairing Non-Root File Systems in Linux Mint

When dealing with such kinds of file systems, you do not necessarily need to reboot your operating system to utilize the Grub menu’s Advanced Options menu for any repair attempt. It could even be a file system defined on an external USB drive.

Consider the following file system repair steps.

1. List all non-root filesystem partitions to identify the one to repair.

$ sudo fdisk -l
List Linux Mint Partitions
List Linux Mint Partitions

2. Unmount the partition and attempt filesystem repair.

$ sudo umount /dev/sdb
$ sudo fsck -p /dev/sdb

The -p an option is for automatic repair of any broken file.

3. Next, remount the filesystem partition by unplugging it and plugging it back on your computer, and confirm that it is online.

$ sudo fdisk -l
Mount Linux Mint Partition
Mount Linux Mint Partition

Repairing Root File Systems in Linux Mint

Since repairing the filesystem of a running OS is risky, we need the operating system to be on boot mode.

To force Linux Mint to repair and fix root filesystem errors, create the following file and restart your machine.

$ sudo touch /forcefsck

You will however need to create this file every time a file system check needs to take place as the OS deletes it once it is done with it.

A more permanent solution is to set files system check and repair to execute after a specific number of system boots. If we want it to take place after two system boots, the command to execute is as follows:

$ sudo fdisk -l
$ sudo tune2fs -c 2 /dev/sda5
Repair Linux Mint File System on Boot
Repair Linux Mint File System on Boot

From here you should be good to go.

File system errors can affect the responsiveness and performance of your Linux Mint OS to the extend of you considering a fresh re-install of the OS. However, exploring the use of the fsck utility saves you from such drastic actions.

$ man fsck
Ravi Saive
I am an Experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies. Founder of TecMint.com, LinuxShellTips.com, and Fossmint.com. Over 150+ million people visited my websites.

Each tutorial at UbuntuMint is created by a team of experienced writers so that it meets our high-quality standards.

Was this article helpful? Please add a comment to show your appreciation and support.

2 thoughts on “How to Repair File System Errors in Linux Mint”

  1. OK, get more basic for us x-Win converts who used SFC in to fix system files since around 1998. Please stop the techie crypto (ala 1980s DOS era) and state ALL steps. For instance…

    1) What does “create the following file” mean? You only give a short line of text and no other details. What kind of file name or extension? Where saved. etc., etc.

    2) Next… “and restart your machine”. Fine, easy, but then what? If the OS isn’t running to find the file or execute the command, nothing happens.

    3) Now, I’m a very longtime PC user and Shadetree tech (25 old PCs in the basement). In the above-mentioned DOS era, I would’ve added the new command to the Autoexec.bat or Config.sys for execution at startup.

    NO recent Windows user would have the faintest idea how to do that. For a newbie coming into Linux with a possible file error problem, how do we enable the Linux equivalent without reading a command line tome?

    Reply
  2. This “fsck” utility saved my computer’s bacon a little over a year ago. I was using Linux Mint 19.2 and had mounted an external drive that was formatted exFAT. I don’t think the external drive unmounted properly, and suddenly programs wouldn’t launch, and I couldn’t reboot successfully.

    I then booted from a Parted Magic system rescue disc. I ran the “fsck” program from the rescue disc, and I gave it permission to fix all problems found, which were about ten or twelve in quantity.

    The utility finished, and I was again able to boot from the hard drive. There’s never been an indication of any problem since. I considered it a miracle and was very grateful to not have to rebuild my system.

    Reply

Got something to say? Join the discussion.

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published or shared. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.