You are not logged in.
Pages: 1
Hello, I have a build that was done in 2014. I haven't touched it since and recently wanted to go back to it. It was built with an RT kernel, so I thought I'd go in and update the kernel and the system, but of course everything is out of date and breaking. I was able to update the database, but have pacman version errors, keyring errors, etc.
I was wondering if there's a good way to do a system update, without wiping out all the work I wanted to save in the rest of the system. Is there a process through the Live CD that would allow me to do this? From what I've been reading, the easiest way to recover would be this?
pacman crashes during an upgrade
In the case that pacman crashes with a "database write" error while removing packages, and reinstalling or upgrading packages fails thereafter, do the following:
Boot using the Arch installation media. Preferably use a recent media so that the pacman version matches/is newer than the system.
Mount the system's root filesystem, e.g. mount /dev/sdaX /mnt as root, and check the mount has sufficient space with df -h
If the system uses default database and directory locations, you can now update the system's pacman database and upgrade it via pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Syyu as root.
After the upgrade, one way to double-check for not upgraded but still broken packages: find /mnt/usr/lib -size 0
Followed by a re-install of any still broken package via pacman --root /mnt --cachedir=/mnt/var/cache/pacman/pkg -S package.
Last edited by forkenbrock (2017-01-09 21:10:05)
Offline
You boot the live CD and use pacman from the live CD to upgrade your system (with the --root option). You need to first mount your full system to a path on the live CD (system root, /boot directory, /usr, /var... whatever you have on separate partitions). You will also need to mount some special directories inside the mountpoint (e.g. /dev, /sys... there should be a list one one of the wiki pages). After that, point pacman to the mointpoint and do a full system upgrade.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Ok, thank you.
You boot the live CD and use pacman from the live CD to upgrade your system (with the --root option). You need to first mount your full system to a path on the live CD (system root, /boot directory, /usr, /var... whatever you have on separate partitions). You will also need to mount some special directories inside the mountpoint (e.g. /dev, /sys... there should be a list one one of the wiki pages). After that, point pacman to the mointpoint and do a full system upgrade.
Offline
Note that you could also use the Arch Linux Archive to update your system in monthly increments... although that will take a lot longer and use a lot more bandwidth.
Advantages:
You don't need to take the system offline and use the install media you might not have handy.
Depending on what packages might have replaced what packages, a single jump via the install media might miss part of the upgrade path and give you headaches/dependency errors. Incremental updates are more reliable -- after all, that is what normally happens!
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Note that you could also use the Arch Linux Archive to update your system in monthly increments... although that will take a lot longer and use a lot more bandwidth.
Advantages:
You don't need to take the system offline and use the install media you might not have handy.
Depending on what packages might have replaced what packages, a single jump via the install media might miss part of the upgrade path and give you headaches/dependency errors. Incremental updates are more reliable -- after all, that is what normally happens!
Don't forget to check previous news items on the front page for manual upgrade instructions as you walk through the upgrades.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
This didn't work for me. I checked my pacman log and followed the instructions below to go back to the day after my last update. I received the errors shown below that.
replacing your /etc/pacman.d/mirrorlist with the following content:
##
## Arch Linux repository mirrorlist
## Generated on 2042-01-01
##
Server=https://archive.archlinux.org/repos/2014/03/30/$repo/os/$arch
Then update the database and force downgrade:
# pacman -Syyuu
error: dhcpcd: signature from "Anatol Pomozov <anatol.pomozov@gmail.com>" is unknown trust
:: File /var/cache/pacman/pkg/dhcpcd-6.3.2-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] y
error: nspr: signature from "Anatol Pomozov <anatol.pomozov@gmail.com>" is unknown trust
:: File /var/cache/pacman/pkg/nspr-4.10.4-1-x86_64.pkg.tar.xz 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)
Errors occurred, no packages were upgraded.
Note that you could also use the Arch Linux Archive to update your system in monthly increments... although that will take a lot longer and use a lot more bandwidth.
Advantages:
You don't need to take the system offline and use the install media you might not have handy.
Depending on what packages might have replaced what packages, a single jump via the install media might miss part of the upgrade path and give you headaches/dependency errors. Incremental updates are more reliable -- after all, that is what normally happens!
Last edited by forkenbrock (2017-01-09 21:39:22)
Offline
The original plan of updating from Live CD didn't work either. I went through the steps below, but seemed to get stuck at the end. Everything seemed to mount OK, but the refresh happened very quickly, as if it was updating the newer OS and it definitely didn't change the OS on the drive.
Create Arch USB with Universal USB Installer
pacman -Syu
mount /dev/sdax /mnt #mount all partitions on existing drive
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
pacman --root /mnt --cachedir /mnt/var/cache/pacman/pkg -Syyu
Some posts recommended this command. The word Root in the command turned color from Red to White and there was no longer network connectivity, to connect pacman.
chroot /mnt /bin/bash
Offline
pacman-key --refresh-keys
Sometime over the last couple years, anatolik's key expired and was updated in archlinux-keyring. Since your date did not go back in time with everything else, gpg is throwing fits.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thank you Eschwartz, I will try this.
pacman-key --refresh-keys
Sometime over the last couple years, anatolik's key expired and was updated in archlinux-keyring.
Since your date did not go back in time with everything else, gpg is throwing fits.
Offline
Well, I worked through several errors and had the updates installed up to 7/20/16, but something in the keyring was broken, so I could no longer update the keys. When I rebooted my GUI was corrupted (I was using LXDE) and I just got a blank screen full of white squares.
I thought I might give it one more try, by using the Live CD to repair broken packages. I don't know if this would solve my problem and I don't know why the commands below wouldn't allow me to do a fresh update from the Live CD.
Create Arch USB with Universal USB Installer
pacman -Syu
mount /dev/sdax /mnt #mount all partitions on existing drivemount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/devpacman --root /mnt --cachedir /mnt/var/cache/pacman/pkg -Syyu
Offline
"mount /dev/sdax /mnt #mount all partitions on existing drive" change this according to your partition.
sdax is false. It should be sda1 or sda2 ...
Last edited by akrep55tr (2017-01-10 09:54:46)
Offline
I did actually get that part right. I can see how it looks like I made an error there, so thanks for pointing it out.
"mount /dev/sdax /mnt #mount all partitions on existing drive" change this according to your partition.
sdax is false. It should be sda1 or sda2 ...
Offline
It seems that this command was supposed to go in there somewhere, but I'm not sure where; it seemed to kill my pacman connection when done after all the mount steps.
arch-chroot /mnt /bin/bash
Create Arch USB with Universal USB Installer
pacman -Syu
mount /dev/sdax /mnt #mount all partitions on existing drivemount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/devpacman --root /mnt --cachedir /mnt/var/cache/pacman/pkg -Syyu
Offline
Please use the edit function to append information to your previous post when it is the last in the thread, as per our forum policy. It is also the convention to post replies below quoted posts so that the entire post can be read in order from top to bottom. Thanks.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Pages: 1