All writing

Project

My flight feeder's SD card died

A Raspberry Pi that had fed flight-tracking services for years lost its SD card, and I rebuilt it to patch, firewall and reboot itself.

I don’t know at what age you become the guy who puts an antenna on their house, but I’m apparently past it. Flight tracking, and airplanes in general, are one of my unquestionably nerdy passions, so I am both a consumer of multiple flight-tracking services and a contributor to them. A foot-and-a-half antenna picks up the position reports aircraft broadcast (ADS-B), sometimes from hundreds of nautical miles away. A Raspberry Pi runs a decoder that turns that radio signal into aircraft positions, and feeder software forwards them to FlightAware and Flightradar24. Living near the San Jose, San Francisco and Oakland airports, with all the regionals between them, there is plenty to hear.

The Pi is a set-it-and-forget-it device, and it has done the heavy lifting for years. I built it long enough ago that AI played no role in setting it up or maintaining it.

Finding out it was sick was dumb luck. With AI-enhanced exploits and the CVEs that follow them arriving en masse, I’ve made a more regular habit of checking that the automatic updates on my homelab devices are in fact updating automatically. On November 14 the Pi wouldn’t take an update, and after a reboot it never came back. It took me a while to recall where it was even plugged in. When I finally got my hands on it, the light pattern was clearly showing an error state.

Until that reboot, the health monitor I had on it was reporting it available, much like the beacon on the water planet in Interstellar, which kept telling the crew the planet looked promising long after a giant wave had killed the astronaut who landed there. All my monitor checked was whether one port accepted a connection.

I assumed the Pi had locked up. It had never occurred to me that I might have used up the write endurance of the SD card itself. Limits like that feel theoretical when you buy the card. Years later they are very real. With the card in a reader on my homelab server, the kernel log filled with hardware errors on reads, and an attempt to copy the 256 GB card gave up 4.4 GB in. Mounted read-only, it still gave my AI agent two files intact: the ones that identify this Pi to each service. The SSH configuration, the decoder’s settings and the package database were corrupt.

I had days invested in installing, configuring and securing that device, and enough of a sunk-cost reflex that I didn’t want to re-litigate all of those decisions. I wanted to be back up with the least time and friction possible. Repairing the filesystem in place was out, since the card itself was failing. Cloning the whole card onto a new one would have carried the corruption along. And the operating system underneath was built on Debian 11 (“bullseye”), whose long-term support had ended on August 31. So the two identity files went onto a fresh install.

I am sensitive to leaning on AI as an alternative to tackling hard challenges. In this case I had been down the path more than once, learned the space and had the result running for years, so I was comfortable using AI for a brief refresher instead of rolling it by hand for the sake of doing it the hard way. I could skip to what I had missed the first time and what had been introduced since. The session was quick, and it felt like reconnecting with an old friend.

One thing the old build had missed: its decoder came from a community install script and never updated itself. The new one runs Raspberry Pi OS Lite, with the decoder and feeder from FlightAware’s own package repository and Flightradar24’s from theirs. Automatic updates cover every package source, the two vendors’ included, and the Pi reboots itself at 4 a.m. when a patch needs it. A firewall drops inbound traffic except a few ports from my home network. The system log stays in memory instead of on the card. Both services picked the Pi up as the same feeder it had been. As of that evening it was running on a spare 8 GB card, with a high-endurance one on order.

The monitoring got the treatment I’ve learned in my last six to twelve months of homelab work with AI tools: point the check at a specific endpoint instead of pinging an IP, so it catches an outage of the service you actually care about. One monitor now reads the Flightradar24 feeder’s own status and wants both the feed and the receiver connected. A second reads the status of PiAware, FlightAware’s feeder. When the decoder was stopped for three minutes, both flagged it on their next check, and the test ended before either sent an alert. Both watch the feeding; the card itself, the part that failed this time, is outside what they check.

These services exist to report out to the world, so I’m more comfortable with them on a standalone Pi, on its own segment of the network, than in a container that goes down whenever its host restarts. The cost is that I don’t check on it. Once the high-endurance card is in, I’m sure it will be another few years before I physically put hands on it again.