fsck error on boot: /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

794,360

Solution 1

Try this:

fsck /dev/sda6

(where /dev/sda6 is the partition mentioned)

And enter Yes (y) to for each error. Or press a one time for always-yes.

Then reboot and it should be fine.

Solution 2

I have noticed that even if you do a fsck on the disk the problem may occur again in a few days.

I have found that the problem is worse on SSD disks than the regular HDD disks. I have found some steps that may fix the problem temporarily.

fsck -fy /dev/sda1 

if sda1 is the right partition - the prompt will tell you exactly which one requires fsck.

After that if the systems boots up you may have another problem with the package management system, so if you open a terminal and type sudo apt-get update you may get an error. Do not worry. Run these commands:

sudo apt-get update
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade

My opinion is that there is serious problem in Ubuntu with regard to SSD disks. The community should fix it.

I have found a possible cause of this problem: Probably the system did not shutdown normally.

Solution 3

UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY means there is some file system error in the disk. Run the fsck command manually. After that it will ask some more questions - just answer y and press enter and finally reboot the server.

enter image description here

Solution 4

Type exit into the prompt, and it should 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. The -y flag answers yes to all the prompts it would otherwise have given you - you don't have to use it but it is recommended. Once it has finished, type reboot into the prompt, and if prompted, select to continue normal startup.

Solution 5

fsck -y /dev/sda

eg:

fsck -y /dev/sda1
fsck -y /dev/sda2
Share:
794,360

Related videos on Youtube

Jordy
Author by

Jordy

Updated on September 18, 2022

Comments

  • Jordy
    Jordy over 1 year

    I dual boot Ubuntu and Windows 7.
    I was browsing on FireFox in Ubuntu and all of a sudden I get some error message, so I rebooted.

    Now when I try to boot into Ubuntu I get this message:

    fsck from util-linux 2.26.2
    /dev/sda6 contains a file system with errors, check forced.
    /dev/sda6: Inodes that were part of a corrupted orphan linked list found.
    
    /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
            (i.e., without -a or -p options)
    fsck exited with status code 4
    The root filesystem on /dev/sda6 requires a manual fsck
    
    Busybox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built in shell (ash)
    Enter 'help' for a list of built-in commands.
    
    (initramfs) _
    

    How can I fix this?

    • Silicomancer
      Silicomancer over 7 years
      Have you been able to find out the root cause? I experienced exactly the same issue two times within two days using Kubuntu 16.04. Is this some software problem or an indication for defective hardware?
    • gammapoint
      gammapoint about 7 years
      @Silicomancer, I had this, and other related issues, and it seems quite likely to be related to a failing hard drive. I know my hard drive failed some of the S.M.A.R.T diagnostics right around when this problem occurred. Sometimes a manual 'fsck /dev/sdaX' would fix it, but other times the problem wouldn't be resolved and I'd get a kernel panic on the next boot. I've got a new HD in the mail.
  • Jordy
    Jordy over 8 years
    This worked, however in Ubuntu I still get this error message: An error occured, please run Package Manager from the right-click menu or apt-get in a terminal to see what is wrong. The Error message was: 'Error: Opening the cache (E:Read error - read (5: Input/output error) E:The package lists or status file could not be parsed or opened.) This usually means that your installed packages have unmet dependencies.
  • Nikolay Nikolov
    Nikolay Nikolov over 8 years
    Ok, so run fsck -a /dev/sda6 and enter Yes to all errors.
  • Jordy
    Jordy over 8 years
    Sorry, I submitted my comment to your answer too quickly by accident, I wasn't done typing yet.
  • Jordy
    Jordy over 8 years
    And when I do apt-get update, it hangs on "Could not open file /var/lib/apt/lists/partial/pkg.tox.chat_debian_dists_nightly‌​_release_binary-i386‌​_Packages - open (30: Read-only file system)
  • Nikolay Nikolov
    Nikolay Nikolov over 8 years
    Reboot linux, and if all looks good from the booting, then you should go to the apt-get again. If puts you again to busybox terminal, run fsck -a /dev/sda6 and repair the errors.
  • Jordy
    Jordy over 8 years
    I get fsck from util-linux 2.26.2, /dev/sda6 containsa filesystem with errors, check forced, /dev/sda6: 252365/2445984 files (0.1% non-contiguous), 1433171/9764864 blocks, fsck exited with status code 1, Welcome to emergency mode! After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboor "systemctl default" or ^D to try again to boot into default mode. root@jordy-desktop:~#
  • Jordy
    Jordy over 8 years
    And when I do fsck -a /dev/sda6 I get "e2fsck: Cannot continue, aborting."
  • Nikolay Nikolov
    Nikolay Nikolov over 8 years
    Something really wrong with this ubuntu setup... I don't have any other ideas.. sorry.
  • farmuel Angel
    farmuel Angel over 7 years
    After the fsck command type he command exit to force the system to boot again in runlevel 5 or just reboot with init 6.! Your choice.!
  • David Foerster
    David Foerster over 7 years
    Please edit your own posts if you want to add or clarify something.
  • Abdulla Al Sun
    Abdulla Al Sun about 7 years
    This fucked me! and my workstation goes to read only mood. :(
  • aditya
    aditya almost 7 years
    do not forget to add -y at the end, or else glue your finger pressed to y
  • Slaus
    Slaus almost 7 years
    I was facing such problem for at least ~10 times for now and actually now I recall that before that I was always installing something. But not every installation followed by such problem.
  • Arigion
    Arigion over 6 years
    @aditya: You could also press 'a' for always instead of 'y' without using -y
  • Rishabh Agrahari
    Rishabh Agrahari over 5 years
    Okay, this temporarily solves the error but sooner or later I get the same error. What's the problem? Is my disk at fault or Ubuntu itself?
  • Nikolay Nikolov
    Nikolay Nikolov over 5 years
    @Rishabh Agrahari, I think maybe the disk. You should test it with smartd tools.
  • Jasom Dotnet
    Jasom Dotnet over 5 years
    where to type fsck /dev/sda6??
  • Nikolay Nikolov
    Nikolay Nikolov over 5 years
    @JasomDotnet On your terminal where you see : (initramfs)
  • Robin Hood
    Robin Hood over 5 years
    Someone give this user the "Life Saver" badge... Please!! I was worried for a second there 😂
  • Jasom Dotnet
    Jasom Dotnet over 5 years
    @NikolayNikolov I'm facing similar problem again. I forgot how to open initramfs. Am I right when I do it way: Advanced options > Recovery... ? Because under this path I see this error. Is there any other way ho to open initramfs
  • LIvanov
    LIvanov almost 5 years
    Can anyone explain what are the consequences of facing this error and going through the solution outlined in this answer?
  • Abror Esonaliev
    Abror Esonaliev over 4 years
    Thank you. It's helped me.
  • mostafa.elhoushi
    mostafa.elhoushi about 4 years
    Running fsck directly didn't work with me. I had to reboot, then choose from the boot menu to run Ubuntu in Safe Mode, and then running fsck worked.
  • Chagai Friedlander
    Chagai Friedlander about 4 years
    reboot did not work for me, does anyone know why? I had to manually reboot
  • karns
    karns over 3 years
    I'm still having these issues occasionally often when I leave ubuntu on overnight - my gut says SSD is worse as well and I've seen a post mentioning some task the OS does for SSD occasionally. Wondering what the solution is...
  • Amal
    Amal almost 3 years
    this worked. Thanks
  • Wellington Lorindo
    Wellington Lorindo over 2 years
    Great! You are a big help man!
  • Александр Родин
    Александр Родин over 2 years
    It is work, thank you, but can anyone answer why this error occur?
  • David
    David about 2 years
    The minus y is a very bad idea you wont be able to see what it is fixing and maybe have a clue as to what was or is wrong.
  • marcelocra
    marcelocra about 2 years
    Indeed might be a bad idea to use the -y. In the worst case, it will tell you that you can use a to accept all following prompts.
  • Admin
    Admin almost 2 years
    Perfect answer!