Root file system requires manual fsck [duplicate]

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

Solution 1:

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.

Solution 2:

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