You are not logged in.

#1 2022-07-13 06:15:29

Velcrone
Member
Registered: 2020-05-24
Posts: 14

[SOLVED] All packages PGP signature corrupted in chroot environment

Hi!
While updating, my computer crashed causing grub to give the following error while booting up:

Loading kernel linux…
error: file /boot/vmlinuz-linux' not found.
Loading initial ramdisk…
error: you need to load the kernel first.
Press any key to continue…

So I booted up a liveusb and mounted my file system in arch-chroot so I could run pacman -Syu to hopefully fix the problem.
-first I mounted the the root file system
-then in opened in arch-chroot
-from here everything seemed to be running correctly
-I used iwctl to connect to the Wi-Fi (and verified I could ping 1.1.1.1)
-however whenever I ran pacman -Syu ever single package (including archlinux-keyring which I tried updating separately) gave the following error:
invalid or corrupted package (PGP signature)

Any help would greatly appreciated!

Last edited by Velcrone (2022-07-14 23:58:03)

Offline

#2 2022-07-13 06:26:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,545

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

https://wiki.archlinux.org/title/Pacman … )%22_error
Given the initial kernel problem, they might be actually corrupted, clear the cache first.

Alternatively don't chroot: https://wiki.archlinux.org/title/Pacman … an_upgrade

Offline

#3 2022-07-14 00:04:57

Velcrone
Member
Registered: 2020-05-24
Posts: 14

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

Unfortunately,  neither of those solutions worked.

The first solution didn’t work. All the packages continued to be corrupted, even when I connected via Ethernet. This honestly doesn’t surprise because Pacman deletes all the corrupted packages when they’re corrupted.

When I tried the second (again connected to Ethernet), it would fail to resolve all the hosts to download the databases and exit with the following error:
“Error failed to synchronize all databases (invalids url for server) . This didn’t happen if I tried refreshing without changing sysroot. I tried changing the resolve.conf on the live system to 1.1.1.1 but that didn’t work either.

Offline

#4 2022-07-14 00:18:40

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

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

Please post the output of the following from the chroot

# pacman -S --debug archlinux-keyring
# pacman-key --list-keys Master

See the first link in seth's signature to post the output from the chroot.

Offline

#5 2022-07-14 02:05:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

We need the actual error to know what's going on. "invalid or corrupted package (PGP signature)" is the result of a previous error.

Offline

#6 2022-07-14 04:50:50

Velcrone
Member
Registered: 2020-05-24
Posts: 14

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

Here is the output for pacman -S --debug archlinux-keyring https://pastebin.mozilla.org/o95J6XEq

The output for pacman-key -list-keys Master was considerably shorter lol:
gpg: error reading key: No public key
==› ERROR: A specified key could not be listed.

Thank you for your help!

Last edited by Velcrone (2022-07-14 05:03:26)

Offline

#7 2022-07-14 06:17:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,545

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

The output for pacman-key -list-keys Master was considerably shorter lol:

The "#" prompt indicates to run this as root, did you?

sudo pacman-key --list-keys Master

Offline

#8 2022-07-14 18:42:14

Velcrone
Member
Registered: 2020-05-24
Posts: 14

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

Yes I did. I also tried again to double check and the output was the same. There are also a lot of other keys that list when I run it with just --list-keys.

Last edited by Velcrone (2022-07-14 18:46:11)

Offline

#9 2022-07-14 18:59:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,545

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

sudo pacman-key --list-keys pacman@localhost

https://wiki.archlinux.org/title/Pacman … he_keyring
https://wiki.archlinux.org/title/Pacman … aster_keys

You can also

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

because your filesystem is probably heavily corrupted.

Offline

#10 2022-07-14 20:25:03

Velcrone
Member
Registered: 2020-05-24
Posts: 14

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

Thank you!
I was able to rebuild my master keys with the commands you listed. pacman-key --list-keys master now returns all the master keys. However I’m still getting the same corrupted package error. I tried:
-deleting all the .part files with the find command you listed
-re importing keys with pacman-key --refresh-keys
Unfortunately neither of those made a difference.

Offline

#11 2022-07-14 20:34:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,545

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

Can you update archlinux-keyring?
If not, what's the actual error message?

Offline

#12 2022-07-14 23:17:49

Velcrone
Member
Registered: 2020-05-24
Posts: 14

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

I cannot update archlinux-keyring. Here’s the error: https://pastebin.mozilla.org/2Jj5TOgT/

Offline

#13 2022-07-14 23:41:29

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

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

Have you tried

# pacman-key --populate

Package_signing#Verifying_the_master_keys
Edit:
If that does not work what is the trust on the master keys?

Last edited by loqs (2022-07-14 23:47:28)

Offline

#14 2022-07-14 23:56:36

Velcrone
Member
Registered: 2020-05-24
Posts: 14

Re: [SOLVED] All packages PGP signature corrupted in chroot environment

Thank you all for your help!
I ended up deleting my gnupg folder:

rm -r /etc/pacman.d/gnupg

Then I initialized and populated my keyring:

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

Then I cleared my cache:

pacman -Sc

Finally I updated my arch keyring then the whole system:

pacman -S archlinux-keyring
pacman -Syyuu

For any future internet travelers, here's the full process:
1. Make a arch live USB then boot to it.

mount /dev/rootdrive /mnt(ex. /dev/sda2)
arch-chroot /mnt

Connect to the internet(using ethernet or iwctl) Then:

rm -r /etc/pacman.d/gnupg
pacman-key --init 
pacman-key --populate
pacman -Sc
pacman -S archlinux-keyring
pacman -Syyuu

Thanks everyone for your help!!

Offline

Board footer

Powered by FluxBB