Reinstalling PacmanIt's Sunday night, you trashed your Arch system during a system update, and you have work tomorrow. How to reinstantiate?
If only the keyring is outdated, see:
The solution is updating archlinux-keyring first:
$ sudo pacman -S archlinux-keyring
If that's not enough and you have to reinstall Pacman from the ground up, read on.
Warning: Take everything here with a grain of salt. I am not responsible for any damage you do to your machine. Always read the
installation guide and the
Pacman wiki page.
Prepare a reasonably fresh Arch installation ISO USB drive. I had one with the ISO from early-mid 2022, and that was already too old in February 2023. It's probably possible to use an old ISO, but you won't always be able to follow the wiki when stuff changes.
Boot from the USB drive.
# loadkeys colemak --- only if you're Simon# dhcpcd# mount /dev/yourRootPartition /mntRun the pacstrap line from the
Arch installation guide, but add pacman to the list of things to reinstall:
# pacstrap -K /mnt base linux linux-firmware pacmanThat fixes Pacman itself, but you might still have other problems. You'll want a full system upgrade. We'll use the just-fixed Pacman, but first we'll install the nice fresh mirrors that the drive just fetched.
# cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist# arch-chroot /mnt# pacman -SyyuExit from the chroot and shutdown:
# exit# shutdown -h nowRemove the USB drive. Boot the old system, and happy Simon.
-- Simon