Recovering from emergency mode after a bad /etc/fstab entry on Ubuntu 24.04: a single‑command root shell solution

A One‑Command Escape from Emergency Mode

When a typo in /etc/fstab stops the root filesystem from mounting, Ubuntu 24.04 drops straight into emergency mode. You get a read‑only root shell, but that’s not useful because you can’t edit the offending line—root is already mounted read‑only. The usual fix is to reboot, pull out a live USB, and patch the file from there.
There’s a much quicker way that keeps you on the same machine, preserves the state, and lets you fix the problem in place.

[Read More]

When /usr Shows 100 % Used but df Says Space Is Fine: Spotting Inode Exhaustion

Why Inode Exhaustion Happens

On a busy server you’ll often see df still showing plenty of space, but df -i screaming 100 % inode usage on a mount like /usr. The kernel will happily refuse to create any more files, even though there’s room on disk. The culprit is usually a deluge of tiny files—think logs, temp data, or a mis‑configured service that never cleans up.

Spotting the Problem Quickly

# Space vs. inodes
df -h /usr
df -i /usr

If the first command reports 20 GB free but the second is 100 % used, you’ve hit an inode shortage. Now find the directory that’s eating them.

[Read More]

Fixing the “Failed to mount /home” error caused by a missing UUID in /etc/fstab

The “Failed to mount /home” error and a missing UUID

If you boot into a black screen and the kernel spits out

Failed to mount /home

you’re almost certainly dealing with a stale or wrong UUID in /etc/fstab.
Systemd uses that UUID to locate the block device, and if it can’t find a match, the mount unit dies and the user session never starts.


1. Identify the missing UUID

# Show all block devices with their UUIDs
sudo blkid

# Or a tree view
sudo lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,UUID

Look for the entry that should be /home. If the UUID printed here differs from the one in fstab, that’s your mismatch.
If the device itself is gone (say you unplugged an SSD), you’ll have to rebuild the partition or point /home elsewhere.

[Read More]

Using resolvectl to Debug Stubborn DNS Issues on Linux

Introduction to resolvectl

I’ve seen my fair share of DNS issues on Linux, and one of the most powerful tools in my arsenal is resolvectl. Before diving into debugging, you may want to review our guide on DNS configuration and troubleshooting with resolvectl for a broader overview of the tool’s capabilities. This command-line utility is part of the systemd suite and provides a comprehensive way to query and configure DNS settings on your system. In practice, resolvectl can be a lifesaver when dealing with stubborn DNS problems. Here, we’ll dive into how to use resolvectl to debug these issues, exploring its capabilities, and providing practical examples to help you troubleshoot and resolve DNS problems efficiently.

[Read More]

Using resolvectl to Simplify DNS Configuration and Troubleshooting on Linux

Introduction to resolvectl

I’ve seen many Linux users struggle with DNS configuration and troubleshooting. Editing configuration files like /etc/resolv.conf or /etc/hosts can be a real pain, and it’s easy to make mistakes. That’s why I’m a big fan of resolvectl, a command-line utility provided by systemd. It’s made managing DNS settings a whole lot simpler. In this article, I’ll show you how to use resolvectl to simplify DNS configuration and troubleshooting on Linux.

[Read More]

Recovering from a Failed Boot with a Broken Initramfs: When Your Linux System Won't Start

Introduction to Initramfs Recovery

I’ve seen this go wrong when a simple kernel update causes the initramfs to become outdated or corrupted, leading to a frustrating boot loop. The initramfs is a critical component that loads kernel modules and sets up the system before the root file system is mounted. A broken initramfs can be challenging to recover from, especially for those without extensive experience in low-level system debugging.

Understanding Initramfs

Before diving into recovery methods, it’s essential to understand the role of initramfs in the boot process. The real trick is recognizing that the initramfs is loaded by the bootloader (such as GRUB or systemd-boot) and serves as a temporary file system that allows the kernel to load modules necessary for mounting the root file system. This includes modules for disk controllers, file systems, and network devices, among others. If the initramfs is broken, the system cannot proceed with the boot process.

[Read More]

Rescuing a Linux System with a Broken Initramfs: When Updates Go Wrong

Introduction to Initramfs Rescue

I’ve seen this go wrong when updates don’t quite go as planned - a broken initramfs can leave your Linux system unbootable. The real trick is understanding how initramfs works, so let’s dive into that before we get into the rescue process. Initramfs, short for initial RAM file system, is a temporary file system used during the boot process. It’s responsible for loading kernel modules, setting up the root file system, and handing over control to the main system. If the initramfs is corrupted or incorrectly configured, your system may fail to boot.

[Read More]

Troubleshooting Permission Issues with Shared Directories on Linux Homeservers

Introduction to Shared Directory Permissions

When setting up a Linux homeserver, I’ve seen many people struggle with configuring shared directories for multiple users. It’s a common task, but permission issues can quickly become a headache if not properly managed. In my experience, understanding the basics of Linux permissions is essential before diving into shared directories.

Understanding Permission Basics

Permission basics are pretty straightforward. Each file and directory has three types of permissions: read (r), write (w), and execute (x). These permissions are applied to three categories: owner, group, and other. The chmod command is used to modify these permissions. For example, to set the permissions of a directory to allow the owner to read, write, and execute, while allowing the group to read and execute, you can use the following command:

[Read More]

Recovering a Borked Linux Install with a Rescue Shell and Chroot

Introduction to Rescue Shells and Chroot

I’ve seen my fair share of borked Linux installs over the years, and a rescue shell can be a real lifesaver. This powerful tool lets you access your system’s filesystem and repair or recover data, even when the normal boot process fails. In this article, I’ll walk you through how to use a rescue shell and chroot to recover a damaged Linux install.

Preparing for Recovery

Before you start, make sure you’ve got a backup of your important data - I usually start with rsync or tar to create a backup of critical files. For example:

[Read More]

Taming systemd's Restart Policy: When and How to Use RestartSec and StartLimitBurst

Introduction to systemd’s Restart Policy

I’ve worked with systemd for years, and one of its most useful features is the ability to automatically restart services that fail or exit unexpectedly. This is all controlled by the restart policy, which can be customized using the Restart directive in systemd service files. However, I’ve seen this go wrong when a service is restarted repeatedly in a short period of time, leading to unintended consequences. To mitigate this, systemd provides two directives: RestartSec and StartLimitBurst.

[Read More]