• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / Ubuntu / How To Fix Unexpected fsck Error In Linux Ubuntu

How To Fix Unexpected fsck Error In Linux Ubuntu

By Sourabh / May 30, 2024 Category: How To, Ubuntu

You can run fsck manually in Linux to fix the error “unexpected inconsistency; run fsck manually fsck exited with status code 4”. Let us learn how:

How to run fsck manually in Linux


sudo umount /dev/sdb
sudo fsck /dev/sdb

NOTE: Replace the “/dev/sdb” with the partition showing error or replace /dev/sdb with the device you want to unmount.

You can also run “sudo fsck -py /dev/sdb” where:

  • -p will automatically apply repairs
  • -y will apply corrections to detected filesystem errors

If you do not specify a filesystem with the command, it will analyze the fstab file (/etc/fstab).

If you wish to run fsck on all filesystems at once, run the command “fsck -AR”.

Note:

  1. Run the fsck command as root user
  2. Unmount the device before running fsck

Remember to unmount the device/disk befor you execute fsck command as it may damage your files. Whenever you try running fsck on a mounted device, you should see an error like this: fsck from util-linux 2.34 e2fsck 1.45.5 (28-aug-2023) /dev/sda3 is mounted. e2fsck: Cannot continue, aborting.

Upon successful execution of the command, you will see the total number of fies and clusters on the device/partition “/dev/sda3: 5 files, 1967/1972 clusters”

unexpected inconsistency; run fsck manually fsck exited with status code 4

If you are getting an error “unexpected inconsistency; run fsck manually”, you will have to follow the steps given below:

  1. Type exit into the prompt – it will tell you which partition has an error, e.g. /dev/sda6.
  2. Type fsck /dev/sdaX -y where X is the partition mentioned in the error.
  3. Once it has finished, type reboot into the prompt, and if prompted, select to continue normal startup.

NOTE: If you are getting an error “/dev/sda3 is mounted.”, follow the steps given above to umount and the run fsck command manually.

Once you get back to the normal startup, open terminal and run the following commands: sudo apt-get update sudo apt-get clean sudo apt-get update sudo apt-get upgrade

That’s all, reboot the system again.

Primary Sidebar

Latest Posts

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

Linux Command To Check RAM Size In Ubuntu Terminal In GB

How To Install Proprietary Drivers In Linux Ubuntu Using Terminal

How To Shutdown Linux With A 15 Minute Delay And Message

Free AI Courses With Certificate For Beginners In India

Best AI Plugins For WordPress To Use In 2026

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap