Kirsle.net logo Kirsle.net

Linux is like an old car

February 25, 2021 by Noah

There are many advantages to running a GNU/Linux operating system over something like Windows 10 (performance, privacy/lack of telemetry, security) but one under-appreciated aspect of Linux is that it's easy to repair.

It's like one of those old cars where you can pop the hood and get into the engine and repair it yourself, as compared to many of the modern vehicles out there which have sealed components and require special tools to get into and you need to take them in to a specialist.

Every operating system "breaks" sometimes. When Windows breaks, it boots in to a blue screen of death with a frowney face :( and it offers some "automated troubleshooting tools" which never work. They just spin for a while before saying: sorry! And how do you even begin to fix something like that? What if "Safe Mode" doesn't even load up?

For a specific example, it's been an annual tradition for me that my Windows 10 install gets "stuck": it can not install the new Windows 10 update due to "reasons" that it can't troubleshoot away. It'll do the whole pomp and circumstance: reboot, attempt to install, fail, roll back install, reboot, and tell me how it failed. Only to keep retrying every time I reboot from that point onwards. And I'm a rather light user of Windows (perhaps too much so), I rarely boot into it and even then only to play a few games like Skyrim.

Linux "breaks" sometimes, too, and maybe one day it doesn't boot into the graphical desktop because your nVIDIA drivers got borked somehow or your WiFi stops working after an update. What do you do? First, you can try booting into an older kernel from the bootloader menu; most distros keep the last couple of kernels as options for exactly this case.

Or you can boot into single user (text mode) and have a shell prompt logged in as root, so you can troubleshoot the issue: check log files, edit configuration, install or uninstall programs, and fix it yourself. Everything is very modular in Linux distributions, so it's hard to take down the whole thing. Very rarely is your bootloader so broken that you can't get get into a working single user mode.

Granted, this does require you to have some knowledge about how Linux works, but the great thing is there's lots of good documentation out there. Just google for "your distro name + thing you want to do". The Arch Wiki is great no matter which distro you run, though some small details may differ if you're using Fedora or Ubuntu, so prefer the wiki closest to your own distro of choice. Information from the Debian Wiki and Fedora Wiki tend to be broadly applicable to other Debian and Fedora downstream distros, like Ubuntu and CentOS.

Some of the most important skills to learn that gets you 90% of the way to fixing a broken Linux OS:

  • Get comfortable with the command line. It's not so scary, and it's so efficient I find myself using one quite a lot even when I could have done the same steps, much more slowly, using the GUI.
  • Firsly: learn about Ctrl-Alt-F1 through Ctrl-Alt-F7 (or so). On most Linux distributions these key combinations swap between several Virtual Terminals (text mode login screens). Usually, F7 or F6 is where your graphical desktop is running so you can switch back to that. Sometimes, if your GUI freezes solid, you can Ctrl-Alt-F1 into a text mode shell, log in, check running processes and maybe fix it yourself without a hard power-down, or if all else fails, run a graceful sudo reboot.
  • Learn how to use your bootloader (usually grub2) and boot your system into single user mode. On Fedora this is editing the kernel arguments to add the word "single", it may vary from distro to distro.
  • Learn about "Run Levels" and how to switch between them. Notable Run Levels include "single user text mode", "networked text mode" and "graphical desktop" and switching them may vary by whether your distro runs SysVinit or systemd.

In single user mode, basically only the Linux kernel and bash command line shell need to work, and it's very difficult for these to fail. No networking services start, no graphical desktop starts, and all video cards support text mode output regardless of any driver issues.

I basically never have to reinstall a Linux OS from scratch to fix any problems, and the times when I did, it was because I messed up and I learned to respect root privileges and double-check my commands. 🤣

Tags:

Comments

There are 0 comments on this page. Add yours.

Add a Comment

Used for your Gravatar and optional thread subscription. Privacy policy.
You may format your message using GitHub Flavored Markdown syntax.