You are not logged in.

#1 2024-08-30 18:48:10

gigel
Member
Registered: 2023-06-13
Posts: 14

every pacman -Syu breaks the system

hi all

every time i try to upgrade my system through the usual pacman -Suy the upate process starts, packages are downloaded and then upon installation system freezes, and after reboot there are plenty of missing files from the disk, kernel cannot properly initialize and so on.
typically i do not upgrade the system, since when i do, i usually have to boot from an ubuntu rescuue usb, and fix the system by chrooting into the broken one, and then reinstall all packages

something like this
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)  --overwrite "*"


however, i cant do the same right now since i cant chroot into the system, when trying to do this i get an input output error when invoking bash


so now i'm trying to once again rescue my system but using pacman from the ubuntu usb


cp /mnt/etc/pacman.d/mirrorlist /etc/pacman.d
cp /mnt/etc/pacman.conf /etc/

pacman-key --init
pacman-key --populate

but when trying to install tcsh for instance

pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -S tcs

i get the signature error like the following.

error: tcsh: signature from "Lukas Fleischer (Arch Linux) <lfleischer@archlinux.org>" is unknown trust


i always tell myself not to upgrade the system but every couple of months i stupidly do this.. since plasma6 every major package instalation/upgrade has resulted in a complete crash. but now bash has been fsckd and i've no idea how to fix this...

Offline

#2 2024-08-30 19:44:38

seth
Member
Registered: 2012-09-03
Posts: 58,667

Re: every pacman -Syu breaks the system

using pacman from the ubuntu usb

How are you usign pacman from ubuntu?

Try a recent install iso to not have to rely on any files on your hard drive (which randomly might be corrupted)

About the general situation: Are you using the binary nvidia driver?
=> https://aur.archlinux.org/packages/nvidia-535xx-dkms

Offline

#3 2024-08-30 19:52:47

gigel
Member
Registered: 2023-06-13
Posts: 14

Re: every pacman -Syu breaks the system

yes, i am using nvidia drivers

from arch usb i get call to execv failed i/o error when issuing
pacman --root=/mnt --cachedir=/mnt/var... -Syu --overwrite "*"

the nvmedisk.is fine

Offline

#4 2024-08-30 19:55:52

seth
Member
Registered: 2012-09-03
Posts: 58,667

Re: every pacman -Syu breaks the system

Don't use --overwrite at all but it would suggest that there's an IO error on the usb key, not the nvme.

Offline

#5 2024-08-30 20:01:29

gigel
Member
Registered: 2023-06-13
Posts: 14

Re: every pacman -Syu breaks the system

good call. i will burn another arch resue dusc on a fresh usb

Offline

#6 2024-08-30 20:25:51

gigel
Member
Registered: 2023-06-13
Posts: 14

Re: every pacman -Syu breaks the system

/ is fcked
.cant chroot from ubuntu and 2 arch usbs. cant figure out why i cant overwrite everything by using pacman with root /mnt
so much wasted time reallly

Offline

#7 2024-08-30 20:39:26

seth
Member
Registered: 2012-09-03
Posts: 58,667

Re: every pacman -Syu breaks the system

You cannot chroot if the target is critically corrupted, it implies to run stuff on the chroot target.
You're supposed to use the pacman version on the arch install iso - no chrooting whatsoever and also no "--sysroot" (as that would chroot)

From the install iso, mount your root partition into /mnt, conditionally a boot partition into /mnt/boot.
DO NOT CHROOT!

pacman --root /mnt -Qkk | grep -v ', 0 altered files' > /tmp/howbadisit.txt
cat /tmp/howbadisit.txt | curl -F 'file=@-' 0x0.st # post the link you get and look at the file
# you can then try
pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -S tcs

You'll have to fix the database of every package that shows up w/ a broken mtree

pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg  --dbonly -S <list of packages>

Then reinstall all broken packages

pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg  -S <list of all broken packages including the ones from the previous call and in doubt the kernel>

Then finish off w/ a Syu

pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg  -Syu

You probably want to switch to the 535xx dkms nvidia package, the problem is that the versions since 550xx seem to corrupt the kernel memory and systemd stumbles over that when reading cgroups because it has to restart itself every time it gets updated (don't ask, I'll rant about how idiotic that is)

Offline

#8 2024-08-30 21:18:54

gigel
Member
Registered: 2023-06-13
Posts: 14

Re: every pacman -Syu breaks the system

managed to reinstallevery package and then was able to chroot. i ll see how i can downgrade nvidia. earliest version in my cache is 545...

first i refreshed keys with pscman key --init thrn populate then refresh-keys

afterwards resinstalled every pkg installed on system...

i ll try to install an older dkms, though

Offline

#9 2024-08-30 21:23:11

seth
Member
Registered: 2012-09-03
Posts: 58,667

Re: every pacman -Syu breaks the system

NOT! downgrade!
Downgrading the nvidia module against a current kernel will fail and older 535xx dkms packages in the ALA will not build against current kernels.
=> Use the dkms package from the AUR.

https://wiki.archlinux.org/title/Dynami … le_Support

Offline

#10 2024-08-30 21:36:52

gigel
Member
Registered: 2023-06-13
Posts: 14

Re: every pacman -Syu breaks the system

wait a sec, you mean i cant build dkms 535 against newer kernels?

Offline

#11 2024-08-30 21:54:45

seth
Member
Registered: 2012-09-03
Posts: 58,667

Re: every pacman -Syu breaks the system

You can build the one from the AUR, but not older versions from last year in your cache or the ALA.

Offline

Board footer

Powered by FluxBB