Converting a Nested JSON List of Users into a Simple CSV with jq and awk

When a service spits out a JSON blob that contains a list of users, the data is usually nested and has more fields than you actually need. Turning that into a flat CSV is a common thing to do for automation scripts, reporting, or feeding into spreadsheets. The two most reliable command‑line tools for this job are jq (a JSON processor) and awk (a text filter). Together they give you a fast, secure, and scriptable pipeline.

[Read More]

Free Your Root Partition by Moving /var/log to a tmpfs: A Step‑by‑Step Guide

Why Move /var/log to a tmpfs?

On most production boxes and home‑lab rigs the root file system is a single ext4 or btrfs partition that also holds /var/log. After a few months the logs can eat up gigabytes of space, especially on servers that churn out audit, kernel, or app logs. A full root partition can block package upgrades, kernel updates, or even prevent a boot if the filesystem gets remounted read‑only. Moving /var/log to a tmpfs frees the disk right away, keeps the logs in RAM, and cuts out the need to compress or rotate them manually.

[Read More]

Fixing a Failed /boot Mount in Emergency Mode on Ubuntu 24.04 LTS After a Kernel Update

Why a kernel update can drop you into emergency mode because /boot won’t mount

A fresh kernel can change the initramfs or the boot‑loader’s config, and if the loader can’t find the /boot partition the system drops into that classic emergency shell:

Emergency shell (root=rw) – press Ctrl‑D to continue

Below is a no‑fluff, hands‑on walk‑through that keeps the commands you need, the trade‑offs, and a few security reminders.


1. Inspect the emergency environment

First, make sure the culprit is really the /boot mount. In the emergency shell run:

[Read More]

Stopping Bluetooth headphones from disconnecting on GNOME 48: a quick PipeWire tweak

Why Bluetooth headphones keep dropping on GNOME 48

Bluetooth audio on GNOME 48 is now handled by PipeWire instead of the old PulseAudio stack. The new stack is cleaner, but it also turns on a “low‑power” mode that can make a headset drop after a few minutes of idle time or when you close the laptop lid. The real culprit is usually the kernel’s power‑management for the Bluetooth controller and PipeWire’s default settings.

[Read More]

When a systemd timer for a backup job stops after a kernel update: the `Persistent=true` fix

The underlying problem

When a systemd timer stops firing after a kernel upgrade, the first thing that comes to mind is “something broke during the reboot.” In reality the timer is still in the unit files; it’s the time‑keeping that gets reset. The kernel’s real‑time clock (RTC) is re‑synchronised, and any timers that were scheduled for a time in the past are dropped unless you tell systemd to treat them as persistent.

[Read More]

Using systemd‑cgtop to Spot the Service Eating All Your Memory

Quick Memory Hunt with systemd‑cgtop

When a server starts to feel sluggish, most folks jump straight to CPU or disk I/O. Memory is the silent saboteur that slips under the radar until it’s too late. On modern Linux, every service lives in a cgroup, and systemd‑cgtop gives you a live, per‑service view of how that cgroup is eating RAM. Unlike top or ps, it aggregates the numbers for you, so you can spot the offender in a glance.

[Read More]

Pinning the NVIDIA Driver on Ubuntu 24.04 to Avoid Kernel Update Breakage

Why Pinning the NVIDIA Driver Matters on Ubuntu 24.04

Kernel updates are a blessing and a curse. They bring new features, hardware support, and security patches, but they also can break proprietary modules that depend on a specific ABI. The NVIDIA driver is a prime example: a new kernel may require a new driver build, and if you’re running a GPU‑heavy workload or a GPU‑accelerated service, an unexpected reboot or a “module not found” error can be costly.

[Read More]

How a Forgotten Search Domain in /etc/resolv.conf Broke Docker Container DNS and How I Restored It

The first time I noticed the problem, a Docker‑based microservice was silently timing out on every outbound request. The logs were full of “no servers could be reached” errors, but the host machine could resolve the same hostnames without issue. After a quick check of the container’s /etc/resolv.conf, I saw an odd line: search mydomain.com. The host’s /etc/resolv.conf had no such entry. That single missing search domain was the root of the DNS failure inside containers.

[Read More]

Quickly Restore a Single File From a Borg Backup on an NFS Share

Restoring a Single File from a Borg Backup on an NFS Share

BorgBackup is a popular deduplicating backup tool that works well with remote repositories. In many homelab or small‑business setups the backup repository lives on an NFS share because it’s easy to share across multiple hosts and integrates nicely with existing storage infrastructure. When a single file goes missing or gets corrupted, you want a fast, reliable way to pull it back without pulling the whole archive.

[Read More]

When systemd‑resolved ignores /etc/hosts after a kernel upgrade: how to fix it

Why /etc/hosts suddenly stops being respected after a kernel upgrade

When a kernel upgrade lands, you expect only low‑level changes. In practice, the upgrade can ripple through the entire userland, especially when systemd‑resolved is involved. A common symptom is that hostname lookups that used to resolve via /etc/hosts now fall back to DNS or fail entirely. The culprit is often a subtle change in how systemd‑resolved loads its configuration or how the Name Service Switch (NSS) library consults /etc/hosts.

[Read More]