You are not logged in.

#1 2024-05-15 07:59:40

TotoShampoin
Member
Registered: 2023-07-01
Posts: 37
Website

[SOLVED] Messed up big time with another pacman crash

Okay, so...

I had yet another pacman crash resulting in broken packages

So I booted from a live boot. I did the pacman -Qkk into a tmp file, like usual.
But I did that from the chroot. It could output the broken packages, but I couldn't update it.
So instead, I left the chroot and redis that with root=mnt.

But the issue is that the mtree files were apparently remade, but also, the tmp file is gone now, so I can't reinstall any of the broken packages.

What can I do?


I'm guessing I could try to reinstall every single package, with pacman -Qq and pacman -S, but I'd like to know if there is another solution?

Last edited by TotoShampoin (2024-05-15 10:50:05)

Offline

#2 2024-05-15 08:06:22

seth
Member
Registered: 2012-09-03
Posts: 60,378

Re: [SOLVED] Messed up big time with another pacman crash

The packages w/ previously broken files (which is more relevant than the broken mtree, that's an intermediate step, necessary to fix teh actual problem) will still show up w/ broken files in "pacman -Qkk"

like usual

https://aur.archlinux.org/packages/nvidia-535xx-dkms

Offline

#3 2024-05-15 08:18:36

TotoShampoin
Member
Registered: 2023-07-01
Posts: 37
Website

Re: [SOLVED] Messed up big time with another pacman crash

Okay, here's the pacman qkk (--root=/mnt)
https://0x0.st/XKkw.txt

I should mention that any attempt to use pacman in chroot, with root=mnt AND with pacstrap result in failures as a bunch of "usr/lib is empty, not checked"

Offline

#4 2024-05-15 09:01:29

TotoShampoin
Member
Registered: 2023-07-01
Posts: 37
Website

Re: [SOLVED] Messed up big time with another pacman crash

Oh actually, reinstalling all packages with pacstrap did seem to work, even though a bunch of .so files are said to be missing and thus unchecked.

So, I'm rebooting, and... It still fails.
Failed to start Power Profiles daemon, User Login Management, D-Bus System Message Bus...

It didn't work, I'm missing a bunch of so files sad

Offline

#5 2024-05-15 09:31:09

TotoShampoin
Member
Registered: 2023-07-01
Posts: 37
Website

Re: [SOLVED] Messed up big time with another pacman crash

Nevermind, I managed to reinstall the broken packages and reboot properly.

However, I am STILL missing .so files, and I think these are necessary for kde plasma to work, because sddm doesn't start (even though I can run things on tty).

EDIT: It crashed again, but some packages are still broken, apparently

Last edited by TotoShampoin (2024-05-15 10:10:35)

Offline

#6 2024-05-15 10:09:59

TotoShampoin
Member
Registered: 2023-07-01
Posts: 37
Website

Re: [SOLVED] Messed up big time with another pacman crash

Okay, here's the missing .so files
https://0x0.st/XKdZ.txt

Offline

#7 2024-05-15 10:49:51

TotoShampoin
Member
Registered: 2023-07-01
Posts: 37
Website

Re: [SOLVED] Messed up big time with another pacman crash

I fixed it all, by reinstall one by one each package owning the libs, with pacman -Qo and all.

Solved!

Offline

#8 2024-05-15 10:53:40

Awebb
Member
Registered: 2010-05-06
Posts: 6,662

Re: [SOLVED] Messed up big time with another pacman crash

How did you tell dependencies apart from explicitly installed packages?

Offline

#9 2024-05-15 13:30:49

seth
Member
Registered: 2012-09-03
Posts: 60,378

Re: [SOLVED] Messed up big time with another pacman crash

pacman -S preserves the installation reason by default

The empty objects should have shown up in "pacman -Qkk" as broken packages?
--dbonly only fixes the db, you'll then get linker warnings because the files themselves are still corrupted, that's "ok"-ish, just plow through and install the packages with deviating files (the mtree list is NOT sufficient to fix the system, it's only the package that need database sanitation before the actual fix)

Offline

#10 2024-05-15 13:54:14

TotoShampoin
Member
Registered: 2023-07-01
Posts: 37
Website

Re: [SOLVED] Messed up big time with another pacman crash

Awebb wrote:

How did you tell dependencies apart from explicitly installed packages?

I installed a random package with pacman (curl, in this case), to get the ldconfig warning.
Then I extracted the missing/empty files from those.
Then, for each file, I did `pacman -Qo`.
And then, with a sort and uniq, I did a pacman -S of each broken package

And all worked out!


Among the broken packages were various kde plasma apps n modules, and mesa

Last edited by TotoShampoin (2024-05-15 13:54:47)

Offline

#11 2024-05-16 09:19:01

Awebb
Member
Registered: 2010-05-06
Posts: 6,662

Re: [SOLVED] Messed up big time with another pacman crash

seth wrote:

pacman -S preserves the installation reason by default

I know, off-topic, but has this always been the case? Have I been working around a problem that doesn't exist for years?

Offline

#12 2024-05-16 13:25:21

seth
Member
Registered: 2012-09-03
Posts: 60,378

Re: [SOLVED] Messed up big time with another pacman crash

Mind to elaborate on the supposed problem and workaround?
https://bbs.archlinux.org/viewtopic.php?id=237109 ?

I can't tell whether this has at some point not been the case - you'd have to ask Allan as chances are that he broke it wink

Offline

#13 2024-05-16 13:38:11

Awebb
Member
Registered: 2010-05-06
Posts: 6,662

Re: [SOLVED] Messed up big time with another pacman crash

seth wrote:

Mind to elaborate on the supposed problem and workaround?
https://bbs.archlinux.org/viewtopic.php?id=237109 ?

I can't tell whether this has at some point not been the case - you'd have to ask Allan as chances are that he broke it wink

The "problem" was, that I "remember" from way back, that re-installing an already installed package marked as dependency with pacman -S sets the installation reason to explicit. The workaround in situations like in this thread, was to create two lists of packages and install one with --asdeps and the other without or with --asexplicit. I might have been wrong in the first place or the behavior changed at some point during the last decade.

Good to know it's easy "now".

Offline

#14 2024-05-16 14:08:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Messed up big time with another pacman crash

The suspicion that pacman would not preserve the installation reason has been around for ages - and it just will not go away.  But I don't believe the suspicion was ever valid (at least in the ~15 years I've been using arch).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#15 2024-05-20 18:28:26

TotoShampoin
Member
Registered: 2023-07-01
Posts: 37
Website

Re: [SOLVED] Messed up big time with another pacman crash

So, I have been hit with another pacman crash... Only this time, it's very weird:

It was only 3 packages from "extra". I just don't remember which ones it was.
After the crash, I tried booting anyway, instead of live usb, and... It boots normally?

But also, I can see there is 1 systemd fail, which is "WPA supplicant" (https://0x0.st/XPxD.txt)
I still have access to internet from the ethernet cable, so I guess there is that...

But when I do pacman -Qkk, it seems unable to find any broken mtree (or any unusual altered file...)

Do I have a way to retrieve those 3 obviously broken packages and reinstall them?


EDIT: So, I'm doing the thing again from live usb, and it could find and fix my broken packages.
Moral of the story: When pacman update crashes, assume nothing works normally.

Last edited by TotoShampoin (2024-05-20 18:51:05)

Offline

#16 2024-05-20 20:48:43

seth
Member
Registered: 2012-09-03
Posts: 60,378

Re: [SOLVED] Messed up big time with another pacman crash

Did you consider switching to https://aur.archlinux.org/packages/nvidia-535xx-dkms or nvidia-open in order to hopefully prevent those frequent crashes during updates?

Offline

#17 2024-05-25 10:51:57

TotoShampoin
Member
Registered: 2023-07-01
Posts: 37
Website

Re: [SOLVED] Messed up big time with another pacman crash

seth wrote:

Did you consider switching to https://aur.archlinux.org/packages/nvidia-535xx-dkms or nvidia-open in order to hopefully prevent those frequent crashes during updates?

I happen to be using nvidia dkms, yes

But I don't see why nvidia would be what's crashing?

Offline

#18 2024-05-25 13:42:34

seth
Member
Registered: 2012-09-03
Posts: 60,378

Re: [SOLVED] Messed up big time with another pacman crash

The point isn't about "DKMS" but "535xx", https://bbs.archlinux.org/viewtopic.php?id=293400

Offline

#19 2024-05-25 20:23:30

TotoShampoin
Member
Registered: 2023-07-01
Posts: 37
Website

Re: [SOLVED] Messed up big time with another pacman crash

Oooooh I see, okay

Do I have to uninstall nvidia-dkms first, or will pacman automatically uninstall it?
(I'll find out soon, I just don't have my laptop in the immediate moment)

EDIT: It asks to uninstall. Well, it asks once for nvidia-utils, fails, then asks again for both 550 and utils, which does succeed.

All done! Hopefully it won't break anymore

Last edited by TotoShampoin (2024-05-25 20:48:46)

Offline

Board footer

Powered by FluxBB