How I Accidentally My Arch Installation

“Wait, why isn’t my sudo password working anymore?!”

Good Night, Sweet Prince

I installed Arch back in the spring of 2020 for the first (serious) time on a VM within Kubuntu. After falling in love with how lightweight and fast it was, I decided to wipe Kubuntu and reinstall Arch from scratch there instead.

I ran the very same install for the longest time, seeing my primary desktop go from KDE to GNOME (with Pop Shell) and then to Awesome WM. I installed all kinds of interesting things from a variety of different places, having just a little over 2,000 packages and over 25 flatpaks over the span of three years.

But all of that changed just a few nights ago when I, after not having used Timeshift for over five months, decided to try and update using Amethyst, the AUR helper and Pacman wrapper for the Arch-based Crystal Linux. While it would be easy (and incorrect) to blame Amethyst for everything that happened, I know that it really is all my fault. I truly have nobody else to blame except myself. Truly, in my case, the problem exists between the keyboard and chair.

What Exactly Happened?

When I decided to give Amethyst a shot while updating, it started asking me about .pacnew files, which I was largely unfamiliar with. I had been using the system for years and hadn’t really heard of them, after all. I soon assumed the prompts asking me what to do were largely like the messages on yay that ask if I want to remove unneeded dependencies after installing something off the AUR, something that was largely inconsequential most of the time. Instead of doing the prudent thing of having my external drive connected for Timeshift or even looking up how to handle said types of files, I blindly accepted each prompt to overwrite the files.

How I wish I hadn’t.

I discovered that my sudo password no longer worked that I confirmed what I knew: my Arch installation was now toast.

I had looked it up and discerned that I wasn’t the only one to have this happen to me, although it wasn’t exclusive to people using Amethyst as an AUR helper. However, other people didn’t make the same boneheaded mistake I did where they overwrote a file that gave sudo privileges. I couldn’t run Timeshift and I couldn’t even login because my password was always seen as incorrect.

The Silver Lining

Despite how I messed everything up, this wasn’t entirely a bad thing. There likely was some way to save the whole system in spite of all this, but at the same time, I was thinking about all of the positive possibilities of reinstalling. As much as I loved running my Arch system, I would think to myself every now and then these past several months how a reinstall from scratch could help declutter some of those unused files and packages. My 2,000 pacman packages and 25 flatpaks could have stood to be a much lower number, after all. I even wanted to try btrfs instead of ext4 for Arch (I’ve had a great experience with btrfs on Fedora), and I’m fairly certain my Arch install was BIOS instead of UEFI (I’m still not sure how that happened in the first place, d’oh), and hey, I did want to give systemd-boot a spin.

However, all this time, I put off a potential reinstall because I thought it would have taken too much time. But now that I mishandled .pacnew files, I didn’t really have a choice. I booted into my auxiliary openSUSE installation (I normally triple boot, but can’t really see myself using openSUSE as my daily driver) to move files I wanted to save (mostly stuff from .config) into another external drive, then got to work reinstalling Arch on my NVME drive.

Additionally, I finally got to see what that archinstall script was like. As someone who really wanted to save time and get a functional vanilla Arch system up and rolling, I very much appreciated this option. I didn’t need to deal with unwanted branding or wonky customization like I would with a Manjaro installation; I would get to work with my clean canvas and make the system I wanted to use.

My new Arch system, while it’s not 100% ready right now, is looking much better so far. I’m installing only what I know I’m going to use and skipping what I don’t need entirely, including scripts or apps I only ran once or twice before promptly forgetting about them (and don’t forget the dependencies). I’m pleased with how it’s looking and running up to this point as I try to get finishing touches together. Perhaps my screw-up was a blessing in disguise.

In case anyone is wondering what I did with my media or other documents, I typically store those on an additional drive within my PC as well. One drive to rule them all. Since that drive was unaffected, I didn’t really lose anything valuable. Had anything else happened, I do have a separate external backup of those files.

The Takeaway For Me

I learned a few important lessons:

  1. Don’t blindly accept an update or prompt on something I don’t 100% understand.
  2. Just use Timeshift backups regularly again.

In case anyone wonders why I even stopped using Timeshift in the first place, it’s because of this: I noticed my system started up slightly slower with my external backup drive plugged in, so I decided it would be nicer to boot faster. That was literally it. I stopped backing up just because I didn’t want to wait 5 seconds longer. Patience really is a virtue.

I know this post is a little on the self-deprecating side, but I felt it was worth writing about regardless, as it could serve as a reminder that I (and many others) don’t know everything about Linux, that there’s always something else to learn. Even outside of Linux overall, it’s a good mindset to have in life, that we could always stand to learn more and to learn from our mistakes.

Have you ever botched an installation of your OS, be it Linux, Windows, or macOS? If so, what was that experience like? How did you recover? If you haven’t, what do you generally do to keep everything running smoothly? Were you able to find positives if you have?

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.