It was a Monday morning. I had recently set up a system on a segmented part of the network behind a proxy. I was running an older Ubuntu LTS (Focal) version and wanted to migrate to Jammy for more up-to-date packages that I frequently use, like QEMU or clang. No one has time to compile those.
I went to upgrade my system. Ubuntu makes this pretty easy with the command
do-release-upgrade. However, it reaches out to https://changelogs.ubuntu.com/meta-release-lts. This wasn't mirrored on the network, and I couldn't reach it. No biggie, I copied the file by hand and directed the
apt cache to load the copied file instead of using HTTP. This worked.
apt detected a new Ubuntu version, went to the Jammy URL provided in the file, downloaded it, and started upgrading packages.
It went well until a
snap snafu. Specifically,
firefox in Jammy is no longer provided by
apt, but instead installed via
apt will automatically
snap install it for you, conveniently. But I couldn't reach snap behind my proxy. I figured I would skip that package. I did. But, at the end of the installation, I received a package installation error that was probably important. Somehow, grub2 depended on firefox. I wish I had a screenshot.
Everything else succeeded, so I figured, what the heck, it's nothing to worry about. I restarted my system. It was at this point I realized that my previous
grub2 install was removed. I probably could have gleaned that from the error messages if I had bothered to read. But I didn't. And I was stuck without a bootloader.
I could have gone into salvage mode, but since it was a new system, I just popped back in the live CD and reinstalled Focal while I got lunch. Don't delete grub2.
Join me in a future article, warning you not to delete libc. 😊