You are not logged in.
Pages: 1
My device got frozen during a pacman update, and I had no choice but to forcefully shut it down.
At the reboot,
error: /boot/vmlinuz-linux not foundSo I restarted using a USB stick and did the following
mount /dev/<Root> /mnt
mount /dev/<boot> /mnt/boot
arch-chroot /mntHowever, last command resulted in an error message
/bin/bash: error while loading shared libraries: /usr/lib/libncurses.so.6: file too shortSo I need help in proceeding from here.
I tried to upgrade the system, but it rightfully complains that I do not have enough memory available.
Last edited by tigerjack (2024-05-25 12:50:03)
Offline
https://wiki.archlinux.org/title/Pacman … an_upgrade
--root … --cachedir
First check
sudo LC_ALL=C pacman -Qkk | grep -v ', 0 altered files'Every package that shows up w/ a broken or missing mtree needs to be first installed w/ the "--dbonly" flag or you'll get file conflicts.
Avoid using --overwrite
Offline
https://wiki.archlinux.org/title/Pacman … an_upgrade
--root … --cachedirFirst check
sudo LC_ALL=C pacman -Qkk | grep -v ', 0 altered files'Every package that shows up w/ a broken or missing mtree needs to be first installed w/ the "--dbonly" flag or you'll get file conflicts.
Avoid using --overwrite
Hello Seth, thanks for the help. I didn't know about those flags.
I tried a slightly modified version of your command
LC_ALL=C pacman --root /mnt --cachedir /mnt/var/cache/pacman/pkg/ -Qkk 2>&1 | grep -v ', 0 altered files'But it was still too verbose, signalling tons of MD5 checksum mismatches.
I tried with grep 'mtree', but I don't know if this is the kind of filter that I need.
Offline
Yeah, sorry - that command is a textblock ![]()
If you think it's really A LOT of affected packages, re-install all packages - first pass w/ "--dbonly" the second pass w/o.
The first pass might get you some errors from ld (empty objects etc.) and other failing alpm hooks - ignore those and move on.
The first pass only serves to fix the database, not the files themselves, so there'll be broken file and they might trigger errors.
Offline
Yeah, sorry - that command is a textblock
If you think it's really A LOT of affected packages, re-install all packages - first pass w/ "--dbonly" the second pass w/o.
The first pass might get you some errors from ld (empty objects etc.) and other failing alpm hooks - ignore those and move on.
The first pass only serves to fix the database, not the files themselves, so there'll be broken file and they might trigger errors.
What about running it only on the files shown with an -Syu?
Or even just run pacman -Syu --dbonly?
Btw, I tried it with a few files, and it appears that I have corrupted PGP signatures
Offline
That's not gonna cut it because you'll have up-to-date versions of most packages. They're just corrupt.
it appears that I have corrupted PGP signatures
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
The details of the error matter a lot.
maybe let's have a look at the situation:
LC_ALL=C pacman --root /mnt --cachedir /mnt/var/cache/pacman/pkg/ -Qkk 2>&1 | grep -v ', 0 altered files' > /tmp/howbadisit.txt
cat /tmp/howbadisit.txt | curl -F 'file=@-' 0x0.stOffline
That's not gonna cut it because you'll have up-to-date versions of most packages. They're just corrupt.
it appears that I have corrupted PGP signatures
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
The details of the error matter a lot.maybe let's have a look at the situation:
LC_ALL=C pacman --root /mnt --cachedir /mnt/var/cache/pacman/pkg/ -Qkk 2>&1 | grep -v ', 0 altered files' > /tmp/howbadisit.txt cat /tmp/howbadisit.txt | curl -F 'file=@-' 0x0.st
That invert match for grep is providing lot of output corresponding to MD5 checksum/SHA256/UID/GID/Modification time mismatch (lot like in it's running for minutes and still didn't stop).
Do you think there is another way to check for the corrupted packages?
Offline
it's running for minutes and still didn't stop
=> Re-install all packages.
Offline
it's running for minutes and still didn't stop
=> Re-install all packages.
I didn't think it would come to that
Anyway, I tried the following
LC_ALL=C pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Qnq | pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -S --dbonly - and I am back to the corrupted packages problem
corrupted (invalid or corrupted package (PGP signature))for most packages.
All of them are highlighted here
https://0x0.st/XZyF.txt
Offline
You don't *have* to re-install *all* packages, but the broken ones.
It's just that if (almost) all packages are broken, it's kind easier to re-intall them all than trying to filter the 3 unaffected.
error: linux-api-headers: signature from "Frederik Schwan <email>" is unknown trust
:: File /mnt/var/cache/pacman/pkg/linux-api-headers-6.8-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).https://wiki.archlinux.org/title/Pacman … nown_trust
pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Sy archlinux-keyring
pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -S linux-api-headersIf that doesn't work, see https://wiki.archlinux.org/title/Pacman … l_the_keys
Avoid disabling signatures at all costs.
Offline
error: linux-api-headers: signature from "Frederik Schwan <email>" is unknown trust :: File /mnt/var/cache/pacman/pkg/linux-api-headers-6.8-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).https://wiki.archlinux.org/title/Pacman … nown_trust
pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Sy archlinux-keyring pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -S linux-api-headersIf that doesn't work, see https://wiki.archlinux.org/title/Pacman … l_the_keys
Avoid disabling signatures at all costs.
Well, I am afraid that disabling signatures is the only thing I am left with
root@archiso ~ # LC_ALL=C pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Sy archlinux-keyring
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
warning: archlinux-keyring-20240520-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) archlinux-keyring-20240520-1
Total Installed Size: 1.66 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring [########################################################################################] 100%
downloading required keys...
:: Import PGP key 6D42BDD116E0068F, "Christian Hesse <eworm@archlinux.org>"? [Y/n] Y
(1/1) checking package integrity [########################################################################################] 100%
error: archlinux-keyring: signature from "Christian Hesse <eworm@archlinux.org>" is unknown trust
:: File /mnt/var/cache/pacman/pkg/archlinux-keyring-20240520-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.
1 root@archiso ~ # LC_ALL=C pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -S linux-api-headers
warning: linux-api-headers-6.8-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) linux-api-headers-6.8-1
Total Installed Size: 5.54 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring [########################################################################################] 100%
downloading required keys...
:: Import PGP key 9D4C5AA15426DA0A, "Frederik Schwan <freswa@archlinux.org>"? [Y/n] Y
(1/1) checking package integrity [########################################################################################] 100%
error: linux-api-headers: signature from "Frederik Schwan <freswa@archlinux.org>" is unknown trust
:: File /mnt/var/cache/pacman/pkg/linux-api-headers-6.8-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.And when I tried to reset the keyring
root@archiso ~ # pacman-key --init
gpg: /etc/pacman.d/gnupg/trustdb.gpg: trustdb created
gpg: no ultimately trusted keys found
gpg: starting migration from earlier GnuPG versions
gpg: porting secret keys from '/etc/pacman.d/gnupg/secring.gpg' to gpg-agent
gpg: migration succeeded
==> Generating pacman master key. This may take some time.
gpg: Generating pacman keyring master key...
gpg: agent_genkey failed: No such file or directory
gpg: key generation failed: No such file or directory
gpg: Done
==> Updating trust database...
gpg: no need for a trustdb check
root@archiso ~ # pacman-key --populate
==> ERROR: There is no secret key available to sign with.
==> Use 'pacman-key --init' to generate a default secret key.Probably it would be easier to get the keyring directly from /mnt instead of the archiso, but I still cannot chroot inside it.
Offline
pacman-key --config /mnt/etc/pacman.conf --gpgdir /mnt/etc/pacman.d/gnupgOffline
pacman-key --config /mnt/etc/pacman.conf --gpgdir /mnt/etc/pacman.d/gnupg
Ok, here is what I did.
mv /mnt/etc/pacman.d/gnupg{,_bak2}
pacman-key --config /mnt/etc/pacman.conf --gpgdir /mnt/etc/pacman.d/gnupg --init
pacman-key --config /mnt/etc/pacman.conf --gpgdir /mnt/etc/pacman.d/gnupg --populate
pacman-key --config /mnt/etc/pacman.conf --gpgdir /mnt/etc/pacman.d/gnupg --refresh-keys
pacman --config /mnt/etc/pacman.conf --gpgdir /mnt/etc/pacman.d/gnupg --hookdir /mnt/etc/pacman.d/hooks --cachedir=/mnt/var/cache/pacman/pkg -Qnq | pacman --config /mnt/etc/pacman.conf --gpgdir /mnt/etc/pacman.d/gnupg --hookdir /mnt/etc/pacman.d/hooks --cachedir=/mnt/var/cache/pacman/pkg -S -The last command resulted in
(2382/2382) checking keys in keyring [########################################################################################] 100%
downloading required keys...
:: Import PGP key 632C3CC0D1C9CAF6, "Balló György <bgyorgy@archlinux.org>"? [Y/n]
:: Import PGP key 76A5EF9054449A5C, "Pierre Schmitz <pierre@archlinux.org>"? [Y/n]
:: Import PGP key 93B11DAA4C197E3D, "Christian Heusel <gromit@archlinux.org>"? [Y/n]
:: Import PGP key F296BDE50368C6CE, "T.J. Townsend <blakkheim@archlinux.org>"? [Y/n]
:: Import PGP key 001CF4810BE8D911, "Jakub Klinkovský <lahwaacz@archlinux.org>"? [Y/n]
:: Import PGP key 2DA2ACC3ECE4DCE6, "Tomaz Canabrava <tcanabrava@archlinux.org>"? [Y/n]
:: Import PGP key FDC3040B92ACA748, "Robin Candau <antiz@archlinux.org>"? [Y/n]
:: Import PGP key F6D84143496F6680, "Campbell Jones <serebit@archlinux.org>"? [Y/n]
:: Import PGP key 498EF247F340C1E0, "Fabian Bornschein <fabiscafe@archlinux.org>"? [Y/n]
:: Import PGP key F05E8C12131AEB5E, "Carl Smedstad <carsme@archlinux.org>"? [Y/n]
:: Import PGP key 07D06351CA5B31BE, "Torsten Keßler <tpkessler@archlinux.org>"? [Y/n]
( 4/2382) checking package integrity [----------------------------------------------------------------------------------------] 0%
(2382/2382) checking package integrity [########################################################################################] 100%
error: linux-api-headers: signature from "Frederik Schwan <frederik.schwan@linux.com>" is unknown trust
:: File /mnt/var/cache/pacman/pkg/linux-api-headers-6.8-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]I tried also with a populate without a refresh of the keys, but with no luck.Should I just delete the pacman cache directory? I am afraid I don't have enough space on the device to just backup the cache directory (it's 14GiB).
While refreshing the keys, I got quite a of output. tmux history shows only the latest strings https://0x0.st/XZvu.txt
EDIT: even a fresh cache results in the same output, that is, a bunch of lines saying
<package> is corrupted (invalid or corrupted package (PGP signature)).Last edited by tigerjack (2024-05-25 09:17:22)
Offline
Hold on, how old is the Install ISO you're using?
Offline
Hold on, how old is the Install ISO you're using?
probably about two years ago.
Offline
OK, that explains that - please download and use a current one.
Last edited by seth (2024-05-25 09:20:57)
Offline
OK, that explains that - please download and use a current one.
I will, thanks again. But I am curious now on the reasons.
Offline
You're using Pacman and Keys from the ISO (this ist also why updating/resetting the Keys of the installed system doesn't Help) and those are too old or at least have too many expired ones in the WOT
Offline
You're using Pacman and Keys from the ISO (this ist also why updating/resetting the Keys of the installed system doesn't Help) and those are too old or at least have too many expired ones in the WOT
Even when using the --gpgdir option?
Offline
Not If you apply that to Pacman itself as well - feelbfree to try whether that works now.
Offline
Not If you apply that to Pacman itself as well - feelbfree to try whether that works now.
That's exactly what I did in the previous post, but apparently it didn't work, and I was just curious way
Anyway. I updated my archiso to the latest version, and the first thing I noticed is that arch--chroot still produces the same error message. Is this bug of some sort?
Then I updated again the pacman keys, and used the gpgdir option. The PGP problem is not there anymore, but now I have a bunch of Errors saying that the file exists in filesystem.
Offline
PGP was probably No Problem with the new ISO at all.
You'll now have to Reinstall the packages with the --dbonly flag First and then without it.
Offline
PGP was probably No Problem with the new ISO at all.
You'll now have to Reinstall the packages with the --dbonly flag First and then without it.
Ok, now after a lot of trials, pacman completes without errors. Thanks!
However, the original problem is still not solved. At reboot, the vmlinuz-linux file is still not found.
Offline
You forgot to mount the boot Partition into /mnt/boot ?
Do so and re-install the kernel. You should also be able to chroot again?
Offline
You forgot to mount the boot Partition into /mnt/boot ?
Do so and re-install the kernel. You should also be able to chroot again?
I could swear that the partition was there, but apparently it wasn't. Now everything seems to work like a charm!
I'll leave here all the steps for future references. Thanks Seth for your infinite knowledge and help ![]()
mount /dev/<Root>
/mnt mount /dev/<Boot> /mnt/boot
# ... mount at least the etc and var partitions if they are separate from the root partition
mount -t proc proc /mnt/proc
mount --rbind /sys /mnt/sys
mount --rbind /dev /mnt/dev
pacman-key --config=/mnt/etc/pacman.conf --gpgdir=/mnt/etc/pacman.d/gnupg --init
pacman-key --config=/mnt/etc/pacman.conf --gpgdir=/mnt/etc/pacman.d/gnupg --populate
pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg --gpgdir=/mnt/etc/pacman.d/gnupg --hookdir=/mnt/etc/pacman.d/hooks -Qnq | pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg --gpgdir=/mnt/etc/pacman.d/gnupg --hookdir=/mnt/etc/pacman.d/hooks -S --dbonly -
pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg --gpgdir=/mnt/etc/pacman.d/gnupg --hookdir=/mnt/etc/pacman.d/hooks -Qnq | pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg --gpgdir=/mnt/etc/pacman.d/gnupg --hookdir=/mnt/etc/pacman.d/hooks -S -Offline
Pages: 1