BTW, I broke my Artix install.

For somewhat of a backstory, I keep running into an error - after I upgrade my system in-place, as I do at least once weekly, my Wireguard VPN stops working entirely until a reboot. The wireguard interface type isn’t found when wg-quick runs the ip link command. I would imagine this has to do with kernel modules, but I haven’t been fucked to care about it enough.

I wanted to connect to my VPN this evening and, naturally, had to reboot. For some reason my system hung on “unmounting network filesystems”, which it has done in the past. Nothing a good ol physical power button full nelson won’t fix.

Except this time, when I rebooted, my Xorg wouldn’t start. I figured maybe something went wrong with the system upgrade I just did, so I ran pacman -Syu again. Nothing. And I mean no output at all. Turns out my pacman binary was just an empty file. And so were several others, including Xorg. Something had gone horribly wrong.

I’m still not sure what happened, honestly. I’m still learning my way around where all the Artix logs are. But here’s how I fixed it.

  • Load into an Artix live USB
  • Decrypt disk with cryptsetup luksOpen /dev/sdX matrix
  • Activate logical volumes with lvchange -ay matrix
  • Check disk for corruption with e2fsck /dev/mapper/matrix-root (nothing of note)
  • Mount the partitions as if I were about to install Artix
  • Realize I need to connect to internet, do so (thanks, earlier me, for writing those steps down here)
  • Do a full reinstall of all existing packages with the following command (thank you to this post: https://blog.pinapelz.com/blog/recovering-interrupted-pacman-upgrade/)
pacman -r /mnt -Qqn | xargs pacman -r /mnt -S --overwrite '*' --noconfirm

Explanation:

  • -r specifies a different root directory
  • -Qqn specifies query the pacman database (-Q), return only package names (-q), and search only the native sync database (-n)
  • Pipe this list of packages to xargs pacman -S
  • --overwrite '*' overwrite all packages
  • --noconfirm only because I had to for it to work - I’m not sure if the output was just too long for my terminal (800+ packages), but it would just spit me back into a prompt instead of giving me the chance to confirm yes or no to install.

After reinstalling and rebooting into my normal system, everything was hunky dory. I was a little concerned there was something else that had gone wrong after I rebooted, because my polybar didn’t load, but I think it was just an update to xrandr or something else that changed my monitor’s name and screwed up all my configs and gave me a little bit of a scare.

I feel like every time one of these issues comes up, I get a little better at troubleshooting and get just that tiny bit of a level up. Over the last month my Debian server has been giving me grief every time the power goes out, and I’ve found a couple little tricks to work around things, though I haven’t written about them. This time, I found man -K as immediate, tangible evidence of level-up.

EOF