So this happened to me right after booting, I booted into EndeavourOS and it won’t start.
This is what I get:
Starting version 249.7-2-arch
/dev/sda5 contains a file system with errors, check forced.
Error reading block 33031137 (Input/output error) while getting next inode from scan.
/dev/sda5: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
_
I tried running fsck /dev/sda5 but nothing happens.
Is there anyway to fix this without reinstalling?
Based on what I read there, -c to update the bad blocks list -y to answer yes to all questions (saves having to answer yes - every time).
The implication is that answering yes means fsck fixes errors.
I may be wrong here, but it seems to me that you may lose some data.
-f is to Force checking even if the file system seems clean, so I’d say no harm is specifying that since you do want to ensure the file system is checked.
So I tried running sudo fsck -cfy /dev/sda5, but I got:
fsck from util-linux 2.37.2
e2fsck 1.46.4 (18-Aug-2021)
/dev/sda5 is in use.
e2fsck: Cannot continue, aborting.
before running it I used ctrl + c to cancel the previous command which is sudo fsck -V /dev/sda5 but it got stuck so I force closed the terminal, is it because of that?
Rebooting fixed the /dev/sda5 is in use. issue
But when running sudo fsck -f /dev/sda5 this is what I get:
fsck from util-linux 2.37.2
e2fsck 1.46.4 (18-Aug-2021)
fsck.ext2: Permission denied while trying to open /dev/sda5
You must have r/w access to the filesystem or be root
[liveuser@eos-2021.11.30 ~]$ sudo fsck -f /dev/sda5
fsck from util-linux 2.37.2
e2fsck 1.46.4 (18-Aug-2021)
Pass 1: Checking inodes, blocks, and sizes
Error reading block 33031137 (Input/output error) while getting next inode from scan. Ignore error<y>? yes
Force rewrite<y>? yes
It’s stuck on this, does it take a long time or is it just stuck?
I would be inclined to give it some time to complete rather then interrupt the fsck.
The fact that it is taking a long time may indicate that your disk is on its way out.
You can use smartctl to work out if you should replace the disk.