You are not logged in.

#1 2024-04-30 18:22:16

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 45

[SOLVED] Performing pacman -Syu crashed laptop, system won't boot

Hi, I'm new to arch, have been using it for two weeks now. After doing a system update today my pc crashed mid update (first time this happens) and when I booted my laptop again I couldn't boot arch. I mounted my root into a live arch iso from usb and tried to follow some of the other forums but I reached a point where I am completely lost.

When trying to do any pacman command from the mounted root i get:

pacman: error while loading shared libraries: /usr/lib/libarchive.so.13: file too short

So I can't perform a

pacman -Syu

from root. Doing it from the live iso using --sysroot outputs for every package that it is corrupted (invalid or corrupted package (PGP signature))

When performing

pacstrap -K /mnt --overwrite libarchive

nothing happens. Doing it withoug the --overwrite flag gives the error

==> ERROR: Failed to install packages to new root

Sorry if this particular case is solved anywhere in the forums, I have been a couple hours browsing and trying things to no avail.

Thanks in advance.

Last edited by BlessedLongsword (2024-04-30 22:46:30)

Offline

#2 2024-04-30 18:43:13

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 45

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

Follow up,

following https://wiki.archlinux.org/title/Pacman … an_upgrade I managed to do the System upgrade, but when performing step 5:

After the upgrade, one way to double-check for not upgraded but still broken packages:

find /mnt/usr/lib -size 0

the output is very big, does this mean that most of my packages have been wiped?

I can't still perform pacman from /mnt/ root

Offline

#3 2024-04-30 19:30:52

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

It means there's some massive data corruption.

LC_ALL=C pacman -Qkk | grep -v ', 0 altered files'

will list all packages that need to be re-installed (though some deviations, mostly config files in /etc are perfectly normal)
If any package shows up w/ broken or missing "mtree", you need to install that with the "--dbonly" flag first.

Offline

#4 2024-04-30 19:55:03

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 45

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

Whenever I try to reinstall anything I get a bunch of warnings of the type

ldconfig: File /usr/lib/... is empty, not checked

Others say that it already exists in filesystem and therefore I get

errors occured, no packages were upgraded

Thanks for the quick reply by the way!

Last edited by BlessedLongsword (2024-04-30 19:57:37)

Offline

#5 2024-04-30 20:12:09

loqs
Member
Registered: 2014-03-06
Posts: 18,859

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

Please post the list of altered files to a pastebin and post the link:

# LC_ALL=C pacman -Qkk 2>&1 | grep -v ', 0 altered files' | tee /tmp/broken_packages.txt
cat /tmp/broken_packages.txt | curl -F 'file=@-' 0x0.st

Offline

#6 2024-04-30 20:22:04

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 45

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

Surely, and thank you

Pastebin:

http://0x0.st/XXo2.txt

Offline

#7 2024-04-30 20:42:59

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

curl: 537 total files, 518 altered files
systemd: 1449 total files, 1154 altered files
systemd-libs: 813 total files, 801 altered files
mesa: 72 total files, 41 altered files

You'll have to at least re-install those four.

pacman -Qkk archlinux-keyring java-runtime-common libutempter mupen64plus

Offline

#8 2024-04-30 20:50:40

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 45

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

I have been reinstalling as indicated in #3, now I am able to perform pacman inside the root. However, trying to install or reinstall anything from root gives

invalid or corrupted package (PGP signature)

Performing

find /mnt/usr/lib -size 0

now only returns the following files that seem relevant (at least by my noob knowledge)

/usr/lib/grub/i386-efi/fdt.lst
/usr/lib/grub/x86_64-efi/fdt.lst
/usr/lib/grub/i386-pc/fdt.lst
/usr/lib/gio/modules/.keep

I'm not sure if I am safe to reboot yet.

Thanks for the help so far, it seems there is progress :')

Offline

#9 2024-04-30 20:54:46

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

invalid or corrupted package (PGP signature)

Please post the entire message - mind you that archlinux-keyring showed up w/ file deviations, try to re-install that.

Did you otherwise re-install curl, systemd, systemd-libs and mesa?

Offline

#10 2024-04-30 21:18:46

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 45

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

seth wrote:

Did you otherwise re-install curl, systemd, systemd-libs and mesa?

Yes, I reinstalled all of the entries I managed to grasp from the command in #3, the current state of that command is here:

http://0x0.st/XXHr.txt

I re-installed archlinux-keyring from the live iso using

--root=/mnt

, doing it from the mounted root outputs the same error, I will post the entire message now:

error: archlinux-keyring: signature from "Christian Hesse <eworm@archlinux.org>" is unknown trust
File /var/cache/pacman/pkg/archlinux-keyring-20240429-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
error: failed to commit transaction (invalid or corrupted package (PGP signature)).
Errors occured, no packages were upgraded

archlinux-keyring reinstall attempt from live iso output:

http://0x0.st/XXHc.txt

Offline

#11 2024-04-30 21:28:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

The reason for that error was the corrupted archlinux-keyring package, it should have gone by now any you should™ be able to chroot into the system and install some package(s) from there?

Offline

#12 2024-04-30 21:34:47

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 45

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

I can't, I am currently getting these errors from chroot when trying to either install something or reinstall it.

error: archlinux-keyring: signature from "Christian Hesse <eworm@archlinux.org>" is unknown trust
File /var/cache/pacman/pkg/archlinux-keyring-20240429-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
error: failed to commit transaction (invalid or corrupted package (PGP signature)).
Errors occured, no packages were upgraded

I tried with a package i didn't have (neovim) and with one I already had (grub), both give the same errors

Last edited by BlessedLongsword (2024-04-30 21:37:18)

Offline

#13 2024-04-30 21:42:23

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Offline

#14 2024-04-30 22:06:48

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 45

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

That did the trick, thank you so much for everything seth and loqs! I reinstalled grup and performed the grub-install and mkconfig just in case. I would like to ask one thing before rebooting.

The crash that happened when performing

pacman -Syu

was quite concerning since it made my caps lock key start blinking and I couldn't perform REISUB so I was basically completely locked out. Should I be concerned about hardware issues on my laptop or is it entirely possible that the upgrade caused this? It never happened before and the timing was the most inconvenient thing ever.

I will take a look at the arch linux wiki pages dedicated to preventive measures when upgrading. I was aware of the dangers of upgrading and I went for it anynway even though 'linux' was between the updated packages (along other relevant ones), I learned the lesson. Sorry for troubling you and thank you very much again!

Offline

#15 2024-04-30 22:11:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

Do you have an nvida GPU?
https://bbs.archlinux.org/viewtopic.php?id=293400

Try https://aur.archlinux.org/packages/nvidia-535xx-dkms (you'll need the linux*-headers package for dkms)

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#16 2024-04-30 22:22:25

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 45

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

Does not seem to bee working.
After rebooting, I booted arch and it is stuck here:

Loading Linux linux ...
Loading initial ramdisk ....

and then it freezes

Offline

#17 2024-04-30 22:26:17

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

Did you (explicitly) re-install the kernel?
If not, try - and don't forget to mount the boot partition.

Also try to boot the multi-user.target (2nd link below) in doubt along "nomodeset"

Offline

#18 2024-04-30 22:45:49

BlessedLongsword
Member
Registered: 2024-04-30
Posts: 45

Re: [SOLVED] Performing pacman -Syu crashed laptop, system won't boot

Okay, that did it, my pc is back. Thanks! (marking as solved)

Offline

Board footer

Powered by FluxBB