You are not logged in.

#1 2019-02-14 21:02:45

yaogen
Member
Registered: 2018-08-03
Posts: 4

Potentially broken EXT4 root filesystem, how should I proceed?

During a reboot, fsck failed and boot stopped telling me to run fsck manually. I ran fsck manually and it passed with correcting several inodes. (side question, where can I find the logs of this failed boot etc?)

Rebooted again and now I see some weirdness in the filesystem. It's limited to 78 files system wide (I think), and it approximates to the same amount of corrections I did before the reboot.

In journalctl I see errors similar to these:

EXT4-fs error (device nvme0n1p2): ext4_lookup:1574: inode #4833958: comm ls: iget: checksum invalid

In terminal I see messages like this:

ls: cannot access 'usr/lib32/libXdmcp.so.6.0.0': Bad message

... as well as (ls output):

lrwxrwxrwx  1 root root       17 May 31  2018 libXdmcp.so -> libXdmcp.so.6.0.0
-?????????  ? ?    ?           ?            ? libXdmcp.so.6.0.0

I was thinking I could reinstall the packages from where these broken files come and it could potentially fix my issues, but I reach out to you guys for some advice before I do anything.

Thanks,

Offline

#2 2019-02-14 22:37:59

yaogen
Member
Registered: 2018-08-03
Posts: 4

Re: Potentially broken EXT4 root filesystem, how should I proceed?

Continued tinkering and it may be that I've managed to fix my issues. Early times yet though.

I checked the filesystem and saw:

  • 14130x messages like "Illegal block NN in inode MM"

  • 3858x messages like "Block NN causes symlink to be too big"

This is what I did:

  • Rebooted into the live USB

  • Mounted a secondary drive.

  • fsck.ext4 -p [my root device]

  • fsck.ext4 -z [undo file on secondary drive] [my root device]

  • Stepped through all errors and allowed fsck to fix them

  • Rebooted into the system and opted to reinstall all packages (see script below)

  • Rebooted again ...

All seems well, but I had to reinstall glib2 for some reason as neither spotify nor firefox started.


Script I used to reinstall all installed (non-AUR) packages:

#!/bin/bash

pacman -Q | awk '{ print $1 }' | sort > /tmp/pacman-installed.tmp
pacman -Qm | awk '{ print $1 }' | sort | comm -3 /tmp/pacman-installed.tmp - > /tmp/pacman-to-reinstall.tmp

pacman -S --noconfirm $(cat /tmp/pacman-to-reinstall.tmp)
rm /tmp/pacman-{to-reinstall,installed}.tmp

(cred Cerebral in topic https://bbs.archlinux.org/viewforum.php?id=34832)


Should I set this topic to solved?

Offline

Board footer

Powered by FluxBB