Whenever I switch on Ubuntu I always see the following message.

(Initramfs): /dev/sda1 contains a file system with errors, check forced.
  Inodes that were a part of a corrupted orphan linked lost found.
  /dev/sda1 : UNEXPECTED INCONSISTENCY; RUN fsck manually.(I.e .,
  without -a or -p options). fsck exited with status code 4. The root
  filesystem on /dev/sda1 requires a manual fsck
  • This shouldn't occur repeatedly. What do you to shut down Ubuntu? Commented Feb 19, 2017 at 17:44
  • Do you dual-boot with Windows? If so, do you have a driver installed in Windows that allows it to read/view Ubuntu EXT4 files/partitions? Please start comments directed at me with @heynnema or I may miss them.
    – heynnema
    Commented Feb 19, 2017 at 18:20
  • No i did not dual-boot windows @heynnema Commented Feb 19, 2017 at 18:26
  • I don't know but the message occurs repeatedly whenever I shutdown and then restart it again. @David Foerster Commented Feb 19, 2017 at 18:29
  • @AbhishekBarman: Again, how exactly do you shut down Ubuntu? Commented Feb 19, 2017 at 20:01

2 Answers 2


From there, you should be able to drop to some maintenance shell (if not already opened), where you may run fsck -yf /dev/sda1.

If there are any errors rerun fsck -yf /dev/sda1

To login as usual simply run exit and proceed normally.

  • 13
    Here y in -yf is for yes wherever the system asks for y/n choice
    – Rahul Gaur
    Commented Jan 20, 2020 at 4:45
  • 1
    I'm very grateful to mathguy for his comment, because remotely supporting someone who is using Linux for development but isn't intimately familiar with grub or working in the CLI makes complicated boot sequences almost impossible, but your comment and his mention that it should work at initramfs was invaluable. askubuntu.com/questions/885062/…
    – dragon788
    Commented Jul 6, 2020 at 15:25
  • 2
    What does the -f mean? It's not documented on Debian 10 (neither is -y, explained by Rahul above).
    – Rodrigo
    Commented Jul 13, 2020 at 15:16
  • 3
    The -f is to force check a filesystem, even if it is seen as clean. More of a reflex, might not be required when your system refuses to boot on that partition.
    – SYN
    Commented Jul 14, 2020 at 21:28
  • wow. Amazing!!!
    – nirala
    Commented Aug 3, 2021 at 16:37

Lets first check your file system for errors.

For 17.10 or older...

  • boot to the GRUB menu
  • choose Advanced Options
  • choose Recovery mode
  • choose Root access
  • at the # prompt, type sudo fsck -f /
  • repeat the fsck command if there were errors
  • type reboot

For 18.04 or newer... (or if the above steps don't work for you)...

  • boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
  • open a terminal window by pressing Ctrl+Alt+T
  • type sudo fdisk -l
  • identify the /dev/sdXX device name for your "Linux Filesystem"
  • type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier
  • repeat the fsck command if there were errors
  • type reboot
  • 28
    Why not just do the fsck -fy /dev/sda1 directly on the prompt ?
    – Soren A
    Commented Feb 19, 2017 at 20:07
  • 3
    At the prompt he gets just after the message. I have never seen this message without a following 'minimal grub' prompt.
    – Soren A
    Commented Feb 19, 2017 at 20:14
  • 3
    Belive me, it works !!
    – Soren A
    Commented Feb 19, 2017 at 20:33
  • 3
    At the prompt he gets below the error message .. whatever it is.
    – Soren A
    Commented Feb 19, 2017 at 20:46
  • 5
    ... At the (initramfs) prompt I was able to run fsck directly (no need for sudo). The system fixed a whole bunch of filesystem errors, and I was able to restart Ubuntu normally. Your answer was almost correct.
    – mathguy
    Commented Mar 30, 2018 at 17:41

Not the answer you're looking for? Browse other questions tagged .