Boot hangs with "The root file system on /dev/sda2 requires a manual fsck" - Technical Help - DeepTalk - Deep Learning Community
Boot hangs with “The root file system on /dev/sda2 requires a manual fsck”
post by mpb on Jun 21, 2018
Errors reading block 1231417 (Input/output error).
/dev/sda2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck exited with status code 4
done.
Failure: File system check of the root filesystem failed
The root filesystem on /dev/sda2 requires a manual fsck
BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs)
post by mpb on Jun 21, 2018
This is caused by a consistency error on the partition containing the root file system. It is often triggered by improperly shutting down the machine.
The general fix is:
# Replace <partition> with that specified in the error (e.g. /dev/sda2).
(initramfs) fsck <partition with error>
Enter Yes(y) to all prompts. Once complete, you will again be presented with the (initramfs) prompt.
# Reboot the machine.
(initramfs) reboot
You may have an issue with package manager upon reboot. In this case:
$ sudo apt-get update && apt-get clean && apt-get update && apt-get upgrade
Members of the Ubuntu community using SSDs (solid state drives) have reported this problem numerous times; this points to a potential bug in Ubuntu.
post by haseeb on Oct 28, 2020
@mpb Thank you very much. I solved my issue with your method.
post by lobhas1 on Dec 9, 2020
Thank you so much, my problem got solved !!
post by Rohandev.dev74 on Dec 13, 2020
Thanks, this works and issue got resolved
post by usermint on Apr 15, 2021
Thanks for the solution.
But after reboot the command $ sudo apt-get update && apt-get clean && apt-get update && apt-get upgrade didn’t work. I was getting the error E: Error reading the CPU table.
So I found this solution to repair the “apt-get”:
Thanks and hope it will help someone.
post by turboslack on May 5, 2021
It worked for me too. Thanks.
post by iravijadhav on Jun 7, 2021
This perfectly worked. Thanks.
post by BlacK on Feb 2, 2022
It worked well, but system is not rebooting. What should I do?
post by Jawhar on Mar 19, 2022
I entered yes but it won’t complete it stays in printing y only
post by Spidey2112 on Nov 29, 2022
Yes it’s own command that for some reason (don’t hesitate to tell me if you know) just prints y several times a second
post by Kiab on May 8, 2023
Thank you that worked for me too
post by markd on Jun 29, 2023
Be careful of this. It is fine to do to get up and running. But concerning.
If you need to do a fsck to get it back:
- Do a backup of that partition
- Install ‘smartmontools’:
$ sudo apt install smartmontools
- Run smartctl to check the health of that drive, it may be failing and perhaps should be replaced.
$ sudo smartctl -x /dev/
Example:
List the drives
$ lsblk
Just run smartctl on the drive, not the partition
$ sudo smartctl -x /dev/sda >& smartctl-sda.txt
$ sudo smartctl -x /dev/nvme0n1 >& smartctl-nvme0n1.txt
Example lsblk:
$sdb 8:16 0 1.8T 0 disk
└─sdb1 8:17 0 1.8T 0 part /mnt
sdc 8:32 0 1.8T 0 disk
├─sdc1 8:33 0 512M 0 part /boot/efi
└─sdc2 8:34 0 931G 0 part /var/snap/firefox/common/host-hunspell
/
vme1n1 259:0 0 931.5G 0 disk
└─nvme1n1p1 259:1 0 931.5G 0 part
nvme0n1 259:2 0 931.5G 0 disk
└─nvme0n1p1 259:3 0 931.5G 0 part
And you would just use the ‘sdb’, ‘sdc’, ‘nvme0n1’, ‘nvme1n1’ from the above list.
The ‘info errors’ you can ignore generally. if it PASSES, media errors, etc are the main concerns or temperatures on NVMes sensor 3 is often unreliable for temperature, but 1,2 are useful.
fsck is normally needed on ‘ungraceful’ shutdowns, and is automatically run. However, if the damage is bad enough it may not self-recover. That is why you may need fsck. files/inodes not recovered are placed in the file system mounted in the base:
For example:
└─sdc2 8:34 0 931G 0 part /var/snap/firefox/common/host-hunspell
/
The mount would be ‘/’ and files would be stored in ‘/lost+found’.