6+ emergency situations where Linux is indispensable
Computer technology has a strange habit of breaking down just when time is at a premium. A forgotten password, a corrupted bootloader, a virus infection, a hard drive failure, or a system that freezes before it even reaches the logo — everyone knows this. At such moments, it is important not to panic, but to have a solution to restore the system to working order. And that can be a Linux distribution in Live format — a portable version of the operating system that runs without installation, directly from a flash drive or disk.
With the help of a Live distribution, you can not only recover files, but also "revive" a broken Windows, check the hardware or erase data irrevocably. In this article, we will analyze the six most common crisis situations where Linux becomes a real savior, and explain how to act step by step.
1. Create an emergency environment
Before we talk about "fires", let's prepare a "fire extinguisher". We are talking about a Live distribution that will be deployed on a flash drive or external SSD/HDD. In other words, it is a full-fledged OS that is deployed from an image to a drive. If you use Windows, it is most convenient to use Ventoy — a utility that allows you to store multiple ISOs on one medium. Alternatives are Rufus (Windows), BalenaEtcher or the dd command in Linux. These utilities can write images to a flash drive or disk.
Now it's time to choose a distribution. Popular "rescue" systems can be:
- Ubuntu has a simple interface and excellent hardware compatibility.
- Linux Mint is a user-friendly distribution based on Ubuntu.
- Manjaro is an Arch Linux-based distribution known for its rolling release model, which provides the latest software in the build.
- Debian is a stable classic.
- SystemRescue is a special set for recovery, tests, and diagnostics.
- Tails or Whonix — if anonymity is important.
- Kali Linux is a solution for testing the security of computer networks, firewalls, and more.
It should be noted that almost all Linux distributions can be run in Live mode, so you can choose according to your taste or habit. It is also important that there are many builds based on Windows PE (Windows Preinstallation Environment) on the Internet, but due to licensing issues, we will not consider them.
After recording, it is worth testing the flash drive: enter the BIOS/UEFI on your PC or laptop, select boot from USB, make sure that the network and drives are displayed correctly. If the Live system starts without problems, you are ready for any accident.
2. Forgotten password: how to bypass locked doors
It's very easy to forget your password. It happens even to the most organized users: you can't remember your administrator password, and access to the system is blocked. However, Linux will help you regain control of the system. The algorithm will be shown using Ubuntu as an example, but the steps are similar for all distributions.
What to do:
- Boot from the flash drive with the recorded distribution.
- Launch a terminal in your distribution and install the chntpw utility if it is not already installed. This is a console utility for resetting Windows passwords. You can install it using the following commands: · sudo apt install chntpw (for Ubuntu and Debian-based distributions) · sudo dnf install chntpw (DNF-based distributions)
- After that, mount the disk or partition where Windows is installed. In the terminal, enter the following commands: · fdisk -l – will list the partitions of the hard disk or SSD so that you can find the one where Windows is installed. · mkdir /mnt/windows – will create the windows folder · mount /dev/sda1 /mnt/windows – will mount the sda1 partition (you may have it with a different letter) so that Linux can access this partition.
- Go to the /mnt/windows/Windows/System32/config/SAM folder using the cd command. In older versions, you can also check the path /WINDOWS/system32/config/.
- Change the password with the command sudo chntpw SAM.
It is important to note that if the drive is encrypted with BitLocker or LUKS, it is impossible to bypass the protection without the key. But in other cases this method works without fail.
3. Corrupted bootloader or missing partitions
Sometimes, after a BIOS update, a sudden power outage, or experiments with partitions, the system stops booting. The screen is black, the cursor is blinking — a familiar picture? But there is a solution for this case too. The following tools will help here:
- GParted — visual partition table editing.
- TestDisk — recovers lost partitions and boot sectors.
- grub-install, efibootmgr — restore the Linux bootloader and UEFI entries.
Step by step:
- Boot from a Live flash drive.
- Run GParted — make sure the disk is visible at all. This will mean that it is not damaged on the power line.
- If the partitions are "disappeared", run TestDisk and let it rebuild the structure.
- For Linux, run sudo grub-install /dev/sdX (where X is the letter or number of your partition), then type update-grub and press Enter.
After rebooting, the system will most likely come to life. Note that here you can use the SystemRescue distribution, which was created specifically for deep system "repair".
4. Saving files when the OS won't launch
One of the main uses of Live-Linux is for data rescue. Even if Windows doesn't boot, your hard drive is usually still accessible. In that case, you just need to boot from the flash drive and copy your files.
- Boot into the Live system.
- Open the file manager and mount the drive (NTFS, ext4, etc.).
- Copy the necessary files to another flash drive or external HDD. Also, if you have your own "cloud", similar to the one mentioned here, and the Live system has access to the network, then you can copy the data there as well.
When the hard drive is partially damaged, for example, after a fall, special utilities will be needed:
- ddrescue — creates an image even with bad sectors, saving what can still be read.
- Photorec — recovers lost photos, documents, archives.
The main rule: do not write any data to a damaged disk, otherwise you will lose more information than you will recover.
5. Hardware check
Sometimes, the fault of the OS is not the system itself, but the computer itself. Overheating, faulty RAM, SSD degradation, or the aforementioned "bad sectors" on the hard drive — all of this can be checked without loading the main OS. There are the following utilities for testing:
- Memtest86+ is a must-have for diagnosing different types of RAM.
- smartctl — reads SMART indicators of hard drives and SSDs (smartctl -a /dev/sda). And although SMART technology itself does not guarantee accurate diagnostics, it can show at least some of the problems.
- sensors, hddtemp — check the temperatures of the CPU, GPU, drives, and other system elements, because overheating problems can also cause OS failures.
- stress-ng, cpuburn — stability testing under load. Classic benchmarks that will allow you to check the operation of the CPU, GPU and other computer elements.
These tools will help you determine whether the system is really crashing due to a software error or if the cause lies deeper in the hardware. Based on this data, you can draw conclusions.
6. If there are problems with viruses
If Windows is so infected that the antivirus won't run, treating it from the inside is pointless. A live Linux distribution allows you to scan the system "from the outside" when malware is powerless. In addition, classic Windows viruses simply cannot run on Linux due to the fundamental differences between the two systems.
Tools:
- ClamAV, or the graphical version ClamTk, is a free antivirus for Linux.
- chkrootkit, rkhunter — search for rootkits in Linux systems.
- Live solutions from ESET, AVG, Bitdefender, Comodo, Norton have ready-made ISO images that can be downloaded and put on a flash drive with Ventoy.
Once downloaded, mount your Windows disk and run a full scan. You can clean or delete any detected files without risking infecting the Live system itself.
7. Privacy and anonymity
There are less "emergency" but no less important cases: for example, you need to work with sensitive information on someone else's computer, or avoid surveillance. For this, there are Live systems with a focus on security.
- Tails is an operating system based on Debian, runs entirely on RAM, and all connections go through the Tor network. This allows you to leave no traces in the digital space.
- Whonix — divides the system into "Gateway" (Tor connection) and "Workstation" (user environment). Due to this, absolutely all network connections are protected. this
- Qubes OS — divides applications into isolated virtual containers, allowing you to separate different activities from each other. For example, one container can contain applications for work, another for entertainment.
No traces are left behind when you turn off your computer. This is an indispensable tool for journalists, activists, or anyone who wants to control their own privacy.
8. Other tasks
A live Linux distribution is a versatile tool that will help not only with system problems, but will also be useful for solving other issues. Here are a few additional cases that help in everyday practice:
- Disk cloning: you can use dd or Clonezilla to migrate your system to a new SSD without reinstalling. A more modern solution, Rescuezilla, is also suitable.
- Backup: rsync allows you to synchronize important directories over a network or to another drive. This utility is available for all popular distributions.
- Permanent data deletion: shred, wipe, or scrub ensures that no files can be recovered, even after formatting. This is important if you are preparing your PC or laptop for sale and don't want anyone to be able to recover your files.
- Remote assistance: via ssh you can connect to another computer and perform diagnostics, even if its main OS does not start.
Tips for using Linux safely
It is also important to understand that there are basic rules that apply to all Linux distributions, both Live and installed. They look like this:
- Never work without a backup. Save your data before making any changes. This is especially true on Linux, but it is true even on Windows.
- Don't change the partition structure randomly. If you're not sure, create an image first, which you can then restore from a backup. It will take some time, but
- Update your Live flash drive. New versions of Linux better support modern hardware, so don't forget to download new versions of the software.
- Use trusted ISO sources. Download images only from official distribution websites.
- Write down your steps. This will help you avoid mistakes and repeat successful actions in the future.
Conclusion
Linux-based Live distributions are not just a tool for "geeks". They are a universal savior that every user, regardless of experience, should have. They will help you recover data, reset passwords, cure an infected system, test hardware, or ensure complete anonymity on the network.
Preparing a rescue USB flash drive takes just a few minutes, but when your computer refuses to start, it may be your only chance to regain control.