Posts

Insight: Always Shutdown First — The Hidden Risk of Yanking Power on Your Pi

Image
Insight: Always Shutdown First — The Hidden Risk of Yanking Power on Your Pi That One Time You Just Flipped the Switch... You thought the Pi was idle. No flashing LED. No screen movement. You reached for the toggle and cut power. Next time you booted? The system didn’t load The SD card mounted as read-only Or you saw the dreaded “kernel panic – not syncing” It’s not your fault. Most people assume a Pi is like a lightbulb—on or off. But under the hood, it’s a full Linux system. And Linux doesn’t like being ghosted. The UNIX Admin Flashback Back in the day, UNIX admins learned this the hard way. Systems like SunOS and Ultrix wrote to disk in big batches. Power loss mid-write could take out half a filesystem. Unlike Windows, which often used smaller, more frequent writes, UNIX trusted its operators to be disciplined. And that same principle still applies. Raspberry Pi uses journaling filesystems ( ext4 ) and flash media (SD cards). Both rely on clean unmounting and orderly shutdowns. With...

Insight: So You Want an Off Switch — Best Practices for Powering Down a Raspberry Pi the Right Way

Image
Insight: So You Want an Off Switch — Best Practices for Powering Down a Raspberry Pi the Right Way The Off Switch We All Wish Was There If you've ever built something with a Raspberry Pi—robot, print server, CNC controller, retro gaming rig—you’ve probably reached that moment: the project works beautifully... but now you need a clean way to turn it off. Then the realization hits. There’s no power button. The Pi 5 technically includes one now, but in most cases it’s hidden inside a case, buried under a GPIO HAT, or left unused. And the Pi 3B+, Pi 4, and Zero? Nothing. No onboard way to ask the Pi, “Hey, can you shut down safely now?” So what do most builders do? They wire a big toggle switch to the 5V line and flip it. Power cuts instantly. The screen freezes. USB devices vanish. Sometimes the Pi won’t boot the next time. Why “Off” Isn’t Just Off Anymore Modern Raspberry Pi boards run a full Linux OS off flash memory. That means the OS is constantly writing logs, updating caches, an...

Insight: What’s Inside That Raspberry Pi Power Switch You Bought? Not Magic — Just Smart Wiring

Image
Insight: What’s Inside That Raspberry Pi Power Switch You Bought? Not Magic — Just Smart Wiring You’ve seen them everywhere—USB power cables with built-in switches, little inline boards with buttons labeled “on/off,” or full-blown HATs that promise safe shutdowns for your Raspberry Pi. They’re convenient. They work. But what exactly are they doing? This post isn’t here to push products—it’s here to decode them. If you’re the kind of builder who prefers to understand first and buy second, this is your guided tour through the inner workings of a typical Pi power switch. Example #1: The Inline USB Switch Cable Let’s start with the cheapest and most common option: a USB cable with a rocker switch on the 5V line. These are everywhere, and here’s the thing—they don’t do anything fancy. They’re just cutting the 5V rail in the cable, often leaving GND and sometimes data lines connected. What it does: Instantly kills power to the Pi No GPIO signaling No delay, debounce, or power-down sequence W...

Solve: Build-Time Drift and the Danger of ":latest" in AWS Lambda

Image
Solve: Build-Time Drift and the Danger of :latest in AWS Lambda What Happened? You deployed a Golang-based AWS Lambda function, built in a Docker container based on arm64v8/amazonlinux:latest . Everything had been working fine—until it wasn’t. Suddenly, cold starts began failing with this runtime error:  Bash GLIBCXX_3.4.30 not found No code had changed. No libraries were touched. But your Lambda wouldn’t boot. Why Did This Happen? The :latest tag silently changed behind your back. That base image update included a newer version of libstdc++ , which exposed a symbol ( GLIBCXX_3.4.30 ) not present in the AWS Lambda runtime environment. Your Go binary was built expecting that symbol—so at cold start, it crashed. Let's Talk About Drift What you're seeing here is a textbook example of what we call build-time drift and runtime drift : Build-time drift occurs when your build environment (like a Docker base image) changes over time without coordination or vi...

New Article on Medium: Your Docker Build Just Lied to You – Here’s the Punchline

Image
Your Docker Build Just Lied to You – Here’s the Punchline This week, we watched a cold start fail with no code changes at all. The culprit? A silent update in a Docker base image. The fix? Pin your image. The lesson? Runtime ≠ build time. And :latest is a ticking time bomb in CI/CD. We’ve shared the full short-form story over on Medium—a field report from the serverless frontlines. It’s sharp, clean, and full of actionable advice. Read it here And don’t say we didn’t warn you.

Insight: When "latest" Breaks Your Lambda—A Case Study

Image
Insight: When "latest" Breaks Your Lambda—A Case Study It wasn’t your code. It wasn’t your CI pipeline. And yet, sometime last week, your previously stable Go-based AWS Lambda function started failing on cold starts. The logs weren’t vague about it either:   Bash GLIBCXX_3.4.30 not found Cue the flashbacks. You scramble for diffs, check Git history, deploy rollbacks—and still, the error persists. Then the realization hits: it’s not your code that changed. It’s the Docker base image. The Silent Assassin: latest The root cause was subtle but not rare: your Dockerfile used arm64v8/amazonlinux:latest as the build image. This tag updated silently in the background and brought along a newer version of libstdc++ with it. Your Go binary, likely relying on a transitive C++ dependency, was now compiled against GLIBCXX_3.4.30 . Problem is, AWS Lambda’s runtime environment didn’t have that symbol ...

Insight: When Smart Mods Go Silent — Why Your Raspberry Pi Refuses to Negotiate 5A Over USB-C

Image
Insight: When Smart Mods Go Silent — Why Your Raspberry Pi Refuses to Negotiate 5A Over USB-C The Custom Build That Should’ve Worked Let’s say you’re designing a slick little Raspberry Pi enclosure—something you can switch on and off without yanking cables. You’ve got a panel-mount USB-C jack wired into the Pi’s power input. You run the 5V, GND, and CC lines to a toggle switch, so when you flip it on, the full power signal flows in cleanly. It’s neat. Minimal. Smart. Then it happens: the Pi boots, but throws a warning. “This power supply can’t provide 5A to USB devices.” Which makes no sense—you’re using the official Raspberry Pi power adapter. No sketchy chargers, no bargain-bin cables. Just your own case mod. The same power supply works perfectly when plugged in directly. So what gives? USB-C: The Silent Negotiator Under the hood, USB-C is a full-blown diplomat. The moment you plug in a power source, it starts quietly negotiating things like: How many amps can be safely delivered Whe...