Klaus on Tilde Town

Spooktober 2023 scare stories: the scariest moment of my history using Linux

Spooktober is here!

Spooktober is back and I can't let this go without writing some of my "scary stories" accumulated during my time using Linux. Previously, I told a spooky version of how I started using Linux but there lays a large gap between then and my experience today. They say that the beginning is the hardest part (adaptation, learning and so forth), but could it be that the middle of the journey also houses some frightening moments?

Turns out that yes, the road to mastery has some pretty significant frights - even if you've been in it for some time. And I'd say it might even be a bigger fright because at that point you've "shed your training wheels" and the safety of the beginners' world, and now are darting through new things on your own. And in this Spooktober special, I'm going to share with you my scariest moment in learning and getting used to Free Software, which happened shortly after my first stint with Linux.

It goes a little like this:

The botched Ubuntu 11.04 update

Previously, I wrote a humorous account of how I brought back my old laptop from the dead using Linux (specifically Ubuntu 10.04 LTS), which became my first-ever introduction to what Linux and Free Software were in the first place.

Thanks to that adventure, I was introduced to a wonderful world of software freedom and eventually privacy, and I'll never look back. But just a few years later, I ran into another bump down the road with another subject: updating. See, a year or so down the road, I saw that the constantly evolving Ubuntu system had a shiny new release, 11.04. Codenamed Natty Narwhal, this was it. Bleeding edge software and everything good that Linux had to offer at this point. And plus, it came with a new user interface called Unity which was as controversial as it was seducing (HUD? Lenses? Whoa).

By then, I had already made myself confortable with Ubuntu in my old chap, how it all worked, but still I was wondering: how would my system be with some pretty cool updates?

So naturally I wanted to update it.

I looked up some instructions on how to perform an update in Ubuntu and figured that the built-in updater would get the job done, being graphical, easy to use and all. Sweetness, let's do it. All seems to be going well!

Except that after about an hour or so of updating, it didn't seem to be working anymore. Oh no. System still responsive, or so it seemed, but the installation wasn't going anywhere as far as I could tell. Ok, let's just give it some time, OK? OK??

Wait another hour or so again, and yup, it looks like it's a lost cause. Ohh no... what do I do now? Clearly I don't have many options: I could wait all night and see if some miracle would happen, or just be practical and face the reality that something broke and probably I wouldn't have a usable system anymore either way.

My mind raced for a while. I thought about the last time such crash happened, and how my previous data was lost forever. I couldn't fathom this happening again, not now with Linux, and with the amazing things I had accomplished since then.

In the end, I chose to be practical and just hard-rebooted. Wait for the next boot to come in and, sigh, no luck. I have an unbootable system, there's nothing I can do about it anymore.

Take a deep breath. Nice and big. Now scream internally.

Rats, I had lost it. I had a perfectly working system, even if it wasn't all the latest software, and now I have nothing. Oh well, nothing that can be done at this point, I have to start over.

And here's where my experience accumulated so far would help me: by then, given my 100% fascination with Linux, I was very used to the process of booting from an external USB drive and exploring a system live, be it in my or other people's computers. This allowed me to cook up a live USB, boot in my broken system with it and, since there was no hardware failure unlike the previous case, I could rescue my data to an external hard drive. That done, and all the tears past, then I'd install again afresh.

Luckily, this time the installation of Natty Narwhal went alright, and I rebooted again into a fully operational system, ready to house my data again. And just like that, that super scary moment in my Linux history went to an end. No more pain.

Scariness as a measure of lack of experience

Several lessons could be learned from this stint. And I think the biggest one I can think of is how often something "scary" is just another word for "I don't have experience with it" (or at least when it comes to computers). Today, LiveUSB'ing in and copying data to an external drive would be the very first thing I'd do in any seemingly-complicated crash situation, but back then it was super scary just to even think about the procedure.

After you've had some experience, you get familiar and it all gets much, much less scary. And this goes for everything else in computing: scary error messages, sudden crashes, tight situations, etc. It's often a question of not seeing it before and just having to read logs, searching error messages and asking around for advice otherwise on IRC, forums, etc.

There's no such thing as a software failure so critical it can't be possibly be recovered from by means of a backup and re-install. And even the common hardware failures (often Hard Drive crashes) are just a purchase away from fixing. You can absolutely fix everything in your computer with a little knowledge and a lot of will to learn something new.

Backup. Always. No matter your experience.

The other crucial lesson learned in this is the value of backups. This goes without saying, of course, but it's always more highlighted in events such as these.

In this case, I was lucky enough to be able to salvage through the crash and be able to restore the files even though the system itself wouldn't boot. But in another universe, this might not have been the case; what if the filesystem itself became corrupted, and thus unmountable? What if some disk partitioning or re-sizing had been going at the time of the crash and the volume was left unusable? There's simply no excuse around it: back yo' data up now.

If you're looking for a beginner's guide on backups, perhaps my article on Project 128 can offer some light. It doesn't have to be complicated, it doesn't have to have multiple redundancies or be incremental or spread across multiple sites to work. But it has to be there in first place, before the incident, in order to be useful (and you must be able to indeed recover from it).

Why not create a "bootstrap script?"

And while the topic of disaster recovery is going on, I'm going to extend it just a tad more to cover one more thing: bootstrapping. I'm not sure if this is the right name for the concept, but I'm referring to a script or otherwise that, after a bare installation of your OS is complete, allows you to configure and customize your machines to a personally usable state as fast as possible. Mine, for example, sets up a full machine for me in under 10min depending on the connection speed.

This could be as simple as a script that installs all the packages you need for desktop use, but it could also add copying config files, creating directory structures, setting keybindings and everything in between. I'm told that in the corporate world this is usually done via Ansible, which I hear allows for an immense amount of customization.

In the context of this post, the purpose of this bootstrap mechanism is to help you get "on your feet" as fast as possible if you make a mistake. Let's say that your system broke because you were curious exploring something in your system and made a mistake. Well, you can't roll back, but you can surely "roll forward" by speeding up the setup back to that point. Not to mention that it also works great when you are setting up new machines.

Conclusion

Whoo, what a scary tale! Living is learning and you will keep making mistakes with your Linux usage, some of them that might be quite scary, but rest assured that you will be able to recover from them provided you have regular backups and a desire to keep learning in spite of mistakes. And if you do make these mistakes, a way to speed up the setting up process is great.


What were some "scary moments" of your using and learning Linux that you can remember? Are they still scary in hindsight? Let me know on Mastodon!


This post is number #45 of my #100DaysToOffload project.


Last updated on 10/28/23