How to recover from a catastrophically failed Arch Linux upgrade
If you read this and you managed to brick you Arch install again: Congrats! I hope you learned something.
To restore the installation, boot the live system and mount the root and boot partitions under, e.g., /mnt
.
You may need to use cryptsetup open
to decrypt the root partition:
1cryptsetup open ... # use `man cryptsetup open` for the details
2mkdir /mnt
3mount <root partition> /mnt
4mount <boot partition> /mnt/boot
5arch-chroot /mnt
If at some point you notice that the boot partition is completely shot, reformat it, reinstall the bootloader, and restore its config files. My recommendation would be to have made a backup of those files beforehand.
Finally, it's a good idea to reinstall all packages in case some of them became corrupted:
1pacman -Qqn | pacman -S -
pacman
preserves which packages are installed explicitly vs. as dependencies.
At this point you're done and should be able to reboot normally. For the future you should consider adding a second kernel if you don't have one, it might save you from doing all of this in a live system.