[Resolved] Error:/dev/sda5 contains a file system with errors, check forced. | Linux | Error

In this article explains how to resolve the issue of /dev/sda5 filesystem with errors and initramfs on Linux or Ubuntu operating system.



Error:

I am unable to open my Linux machine due to /dev/sda5 fs with error. Below are fully error code in my command line prompt.

/dev/sda5 contains a file system with errors, check forced.

Inodes that were part of a corrupted orphan linked list found.

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/08:c0:70:24:20/00:00:00:00:00/40 (error) <F>

55.506854]  ata1.00:  status : {DRDY ERR}

55.506923] ata1.00: error : {UNC}

55.829496] blk_update_request : I/O error, dev sda, sector 200 D flags 0x0 phys_seg 1 prio class 0

55.829647] Buffer I/O error on dev sda5, logical block398, Error reading block 398 ( Input / output error).

/dev/sda5: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

(i.e., without -a or -p options)

fsck exited with status code 4

The root filesystem on /dev/sda5 requires a manual fsck

BusyBox, v1.30.1 (Ubuntu 1:1.30.1 - 4ubuntu 6.2) built - in shell (ask)
Enter 'help' for a list of built - in commands.

(initramfs)_

(initramfs)

Resolution:





After getting the above error, will try to resolve using simple Linux commands.

Step 1: Wait for (initramfs) prompt

Step 2: Once will get the initramfs prompt then enter the below command:

fsck -f /dev/sda5

Step 3: After execute the FileSystem Check command will get the window like below:

fsck from util-linux 2.34

e2fsck 1.45.5 (070Jan-2020)
Pass 1: Checking inodes, blocks, and sizes

760051] Buffer I/O error on dev sda5, logical block 87556896, async page read

Error reading block 87556896 (Input/ouput error) while getting next inode from scan. Ignore error <y>? —-> Here we need enter “y” then will proceed next line




Force rewrite <y> ? yes (Enter “y”)
Test 1 :- Pass 1 : Optimizing extent trees [ here hierarchy tree of file system of Linux]

Test 2: – Pass 2: Checking directory structure [ To check one by one FS ]
Entry ‘system journal’  in /var/log/journal/ d2dd23rds has deleted / unused inode 19270. Clear <y> ? yes (Enter “y”)

We will get same up to Pass 4 once click on all y (“yes”) once it is done.

The above resolution is completed then restart the machine. I try to open machine getting normal window like below.




11 Replies to “[Resolved] Error:/dev/sda5 contains a file system with errors, check forced. | Linux | Error”

  1. After 24 hours and sleep deprivation, so many forums and couldn’t solve the problem, I followed your instructions as printed herein, the problem is solved and the system booted successfully. many, many thanks.

  2. Thank you very much, I was about to reinstall everything. Thanks to you I was able to recover everything.
    Now it works as before.

  3. i got the error thi morning on Linux Mint 20.3 Cinnamon, your solution worked perfectly for me.

    Many thanks, Paolo

  4. Thanks! Following your instructions restored Linux Mint Cinammon on my computer!

    (Note I had first ried “fsck -y /dev/mmcblk0p2” from askubuntu.com “busybox – How do I do a manual fsck? – Ask Ubuntu”, but that didn’t fix my OS.)

  5. I have the error but for me not initramsfs and running the command does nothing

Comments are closed.