Cant run fsck; e2fsck: aborted

1

I had two partitions and I needed to expand the root, because it was too small and I couldn't install updates. So I booted in a Live CD, run gparted and started the process. In order to expand, it would first shrink my home partition. It got stuck in the middle and rebooted, and for my surprise, corrupted some of my files, but not all.

So when I ls, I get a few errors:

ls: cannot access 'file': Structure needs cleaning

I always commit everything to github, so there was no real data loss, but that's very annoying, because apart from the error messages on terminal, chrome, text editor, these files and folders cannot be deleted, so I can't run intellij, can't run npm, because they try to access their folders and fail.

So, I tried for several days to run the glorious fsck, but it always fails. I left it several nights running; I run something like:

fsck -vcfy /dev/sda3

I tried lots of variations of flags (like fsck.ext4 /dev/sda3 -vcfy, fsck -pvcf /dev/sda3, et cetera), it starts, lots of files and errors get fixed, I go to bed, next morning I see several fixes and in the end:

e2fsck: aborted

And the freaking structure needs cleaning are there. This is really driving me crazy, I don't care about those files, I just want to remove the corrupted ones, quickly, what is the answer I'm not seeing???

Luan Nico

Posted 2017-09-09T12:08:47.007

Reputation: 239

Answers

1

Had the same issue. Ran a few times

Create /etc/e2fsck.conf with the following content:

[scratch_files]
directory = /var/cache/e2fsck

Updated e2fsck:

wget http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.43.1/e2fsprogs-1.43.1.tar.gz
tar xzf e2fsprogs-1.43.1.tar.gz
cd e2fsprogs-1.43.1
./configure 
make
cd e2fsck/
./e2fsck

Reran. Same error but I noticed it was completing more with each run. Ran until completion

Eric Robinson

Posted 2017-09-09T12:08:47.007

Reputation: 26

Should have tried these two things. I ended up formatting, and now I finally have a single partition. – Luan Nico – 2017-11-10T09:13:22.437