Archlinux Package Recovery

Posted on January 4, 2017
archlinux, linux, kernel, terminal

My E5450 has developed a nasty freezing bug. It managed to exhibit a freeze during a pacman upgrade, which led to basically everything in /usr/lib turning into 0 byte files.

This has the great effect of init panicking during boot, which leads to the kernel panicking too and making the caps lock key flash (but otherwise keeling over completely.)

The only way to recover from this is to reinstall the whole system. Which, thanks to arch (or rather, thanks to pacman), can be done in-place from a recovery system or arch iso with almost zero loss of user data.

It’s a two-step process:

  1. From the outside, reinstall pacman and all its dependencies
  2. chroot into the system and use the now working pacman to reinstall the entire system

1. Reinstalling pacman

You should now have a working pacman on the target system

2. Reinstall target system

You can now reboot and your system should boot.

References: