You are not logged in.
Pages: 1
Hello,
I was installing
flatpakwhen my computer crashed earlier today. I thought nothing of it at the time, hardware rebooted and when I got back almost everything was broken.
I tried connecting to the internet. Met with `Connection Refused`. Tried running Hyprland:
$XDG_RUNTIME_DIR is unsetDid some light Googling, tried running a few systemctl commands like `systemctl status NetworkManager.service` and still got `Connection refused` or something similar. Sorry I can't provide the actual logs/commands currently as I'm away (and typing this on my phone), but I couldn't find any other sources as to why this might be happening. Any help would be appreciated. Thanks
Last edited by oonebaddog (2024-07-30 01:03:31)
Offline
Boot the install iso, mount the installation root into /mnt and run
LC_ALL=C pacman --root=/mnt -Qkk | grep -v ', 0 altered files' | grep -v backupEverything there showing up w/ a broken or missing mtree needs to be re-installed "--dbonly" and then again properly along everything else w/ suspicious file deviations (every deviation in /usr/{lib*,bin} is bad, some changes in /etc config files are perfectly normal the rest needs casewise judgement)
To re-install from the iso run
LC_ALL=C pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Sy <list of packages> if the system looks fubar, you can also re-install all packages
but you'll still HAVE TO fix the mtree's first by installing at least those pacakges --dbonly, otherwise you'll run into file conflicts.
Don't forget to mount the boot partition into /mnt/boot if you have one.
Offline
So I tried running
LC_ALL=C pacman --root=/mnt -Qkk | grep -v ', 0 altered files' | grep -v backupAnd got
failed to initialize alpm library
(root: /mnt, dbpath: /mnt/var/lib/pacman)
Could not find or read directory Did some more googling, it seems the main cause of this issue is /var/lib/pacman doesn't exist/have exec permissions, but I'm not sure that's the case for me
# ls -l /var/lib/pacman
drwxr-xr-x 986 root root 45056 Jul 27 16:09 local
drwxr-xr-x 2 root root 4096 Jul 28 08:14 syncI figured I might be in a fubar situation, I tried running
pacman -Qnq | pacman --dbonly -S -Met with a wall of
Failed retrieving file '<file name>' from <mirror>: Could not resolve host <mirror>Offline
And got
This is from the iso and you mounted the root of the installed system into /mnt??
lsblk -f
ls /mntMet with a wall of
You didn't configure a network connection.
Offline
This is from the iso and you mounted the root of the installed system into /mnt??
Yeaaa, so the problem was you said that and my brain went "do the mount and also arch-chroot". *face meet palm*
So I fixed that. The other command works fine but theres a couple hundred lines of output. How do I determine which files have broken mtrees?
Offline
How do I determine which files have broken mtrees?
3 seconds later...
LC_ALL=C pacman --root=/mnt -Qkk | grep -v ', 0 altered files' | grep -v backup > out
cat out | grep mtreeOffline
I ran
LC_ALL=C pacman --root=/mnt -Qkk | grep -v ', 0 altered files' | grep -v backup > out
cat out | grep mtreeThere was a list of about 7 packages. I then did
LC_ALL=C pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg --dbonly -Sy <list of packages>
LC_ALL=C pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Sy <list of packages>I figured I fixed the issue, so I rebooted normally, but same problems ![]()
Offline
There might be packges broken that still had perfectly fine mtrees:
LC_ALL=C pacman --root=/mnt -Qkk | grep -v ', 0 altered files' | grep -v backup > out
cat out | curl -F 'file=@-' 0x0.stpacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Sy <those packages>
pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Syu # to clear the stage from partial updates caused by the delay between the various stepsOffline
pacman ... --dbonly -Sy <list of packages>
Note that this can result in old files being 'left behind', as they are no longer part of the updated package, but they weren't cleaned up by the upgrade process. Where possible, it's better to recreate the same package version's db entry as was corrupted (using paclog and/filesystem inspection to determine what that version is). If those specific packages are no longer in your local package cache, the Arch Linux Archive will likely have them.
This may help in this situation where the damage has already been done.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Can you explain what this does?
cat out | curl -F 'file=@-' 0x0.stI understand I'm sending the file to that address. But why? What should I be expecting to be returned?
Offline
Can you explain what this does?
cat out | curl -F 'file=@-' 0x0.stI understand I'm sending the file to that address. But why? What should I be expecting to be returned?
A URL will be returned. The pastebin will be hosting the contents of the file out at that URL.
LC_ALL=C pacman --root=/mnt -Qkk | grep -v ', 0 altered files' | grep -v backup > outWill return all installed packages that have altered files. The altered files could be due to file-system corruption.
Offline
Ah ok thanks.
cat out | curl -F 'file=@-' 0x0.st
http://0x0.st/Xf13.csvI checked that url out of curiosity, it looks like some error.
pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Sy $(cat out | cut -d':' -f1)
<package name> is up to date -- reinstalling
...pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Syu $(cat out | cut -d':' -f1)
warning: <package name> is up to date -- reinstalling
...Last edited by oonebaddog (2024-07-29 19:55:10)
Offline
I checked that url out of curiosity, it looks like some error.
Because it's http://0x0.st/XfI3.csv - you need a better terminal font ![]()
It's 774 packages, just re-install all packages
"is up to date -- reinstalling" is ok, afterwards that list should be *drastically* shorter?
Offline
you need a better terminal font
Sheesh, maybe I just need glasses, even with what you posted I can't tell if that's an uppercase I or a lower case L. Also... you can do that from the iso?! That would actually help so much since the default font for me is eye-strainingly small.
Reinstalled all packages with
arch-chroot /mnt
pacman -Qnq | pacman -S -Exited after and ran
LC_ALL=C pacman --root=/mnt -Qkk | grep -v ', 0 altered files' | grep -v backup > outafterwards that list should be *drastically* shorter?
Edit:
We're at 773 now lol. I think the other files are
themes, icons, zsh stuff though AUR packages. Still looking...
Last edited by oonebaddog (2024-07-29 21:03:34)
Offline
This alone is lethal:
systemd: 1543 total files, 1229 altered files
systemd-libs: 817 total files, 805 altered files
systemd-sysvcompat: 14 total files, 4 altered files
glibc: 1614 total files, 1481 altered files
ncurses: 3935 total files, 3059 altered filesI even doubt the chroot worked but it's unlikely that pacman did?
pacman --root=/mnt -Qnq | pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -S
pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Syupay close attention to any errors.
Offline
Oof. Tried
pacman --root=/mnt -Qnq | pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -S -
error: zstd: signature from <name and email> is unknown trust
File <file> is corrupted invalid or corrupted PGP signature Found this arch forum post from a few years ago. Just not sure if that would help here.
Offline
Is the archiso a bit dated?
Offline
Definitely over a year old
Offline
You can try to "pacman -Sy archlinux-keyring" on the iso first or "pacman-key --refresh-keys" (no chroot, nor "--root" for either of this) but the reliable, fast fix would be to use a recent install iso.
Offline
Updated keyring.
pacman --root=/mnt -Qnq | pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -S -
pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -SyuPackages updated. Cool. Reboot:
Failed to mount /bootOffline
Forgot to mount the /boot partition into /mnt/boot before the update?
Do so and re-install the kernel.
Offline
Wooo! I can at least login to my WM. New problem though
# systemctl list-jobs
No jobs runningNo internet. Tried
# ip link set wlan0 up
RTNETLINK answers: operation not permittedOffline
Fixed. Forgot to disable iwd.service. marking as resolved.
Thanks for the help! ![]()
Offline
Pages: 1