There are a variety of free AI courses with certificate for beginners in India. Whether you're looking to enhance your skills or start from scratch, you can find numerous free AI courses with … [Read More...] about Free AI Courses With Certificate For Beginners In India
Fix Unexpected Inconsistency By Running Fsck Manually From Initramfs
How to fix unexpected inconsistency; run fsck manually fsck exited with status code 4. Easiest way is to run fsck manually in Linux from Initramfs.
Run Fsck Manually In Linux From Initramfs
Before you begin, identify the partition. When dropped into the (initramfs) prompt, the system message usually indicates which partition has errors (e.g., /dev/sda1, /dev/mapper/ubuntu–vg-root).
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 flag is to fix all correctable errors without manual interaction for each prompt.
- -f flag to force a check even if the filesystem appears clean.
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:
- Run the fsck command as root user
- 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:
- Type exit into the prompt – it will tell you which partition has an error, e.g. /dev/sda6.
- Type fsck /dev/sdaX -y where X is the partition mentioned in the error.
- 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.
Repeat if Necessary – If the command reports errors were fixed, run the fsck command again until it reports that the filesystem is clean or no more errors are found.
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. Type exit at the (initramfs) prompt. Now the system will typically attempt to resume the normal boot process automatically.
If not, you can manually type reboot to restart the system. Your system should now boot normally.

