Create squashfs archive from stdin and sign it on-the-fly

May 8, 2021
Linux, Network

The use-case might be a little specific but I’ll describe it nonetheless, hoping it may help someone. A while ago I read Practical Forensic Imaging by Bruce Nikkel and tried out the sfsimage script that he presented therein. The idea is as simple as it is brilliant: combine open-source disk recovery tools like dc3dd with the great compression and usability of readonly squashfs filesystems. The imaged disk is piped directly into a virtual file inside the archive and some metadata of the acquisition is added alongside it to create a “forensic image”. ...

Flash Arduino without a Bootloader from a Raspberry Pi

November 6, 2019
Linux, Electronics, Arduino

To keep things short: I’ve had an Anet A8 3D printer for a while now and wanted to flash an updated version of its Marlin firmware. For some reason however, the bootloader was broken. So I couldn’t flash it with avrdude by simply using a USB cable. For this case you can find lots of tutorials on how to flash Arduino boards with a second Arduino. I didn’t have a second Arduino at the time though … so why not just bit-bang it from a Raspberry Pi instead?


Managing containers with podman and systemd

November 6, 2018
Linux, Container, Systemd

A while ago I stumbled upon podman, which touts itself as an alternative to Docker. Not only does podman not use any big fat daemons™ but it makes it rather easy to run containers in a user-namespace, i.e. with greatly restricted privileges on your system. The fun thing is: you are still root within the container!


Commit Hash Replacement in Git Archives

October 5, 2018
Git, Linux

Trying to implement some sort of automatic versioning based on your git commits or tags is not as easy as it should seem. The idea is to use a feature built into the revision control system to modify your project files and increment version counters automatically or embed commit information into software builds - in my case: the --version output of Go applications built with cobra.


Create a CentOS mirror for Kickstarting

June 29, 2017
Linux, Homelab

This is an update over my earlier post about PXE booting. I’ve learned a few more things and refined some rough edges.

Update: By now I’ve learned even more. See homelab/bootstrap for an updated guide.

My Motivation is similar to the last post: I started building my homelab with virtual machines. Most of them are based on a minimal CentOS 7 installation, and as such I have a lot of very similar systems. Yes, I could probably use containers to great effect. But I prefer the separation/isolation that I get from virtual machines on ESXi.


Local PXE Boot Server

March 9, 2017
Linux, Homelab

Today I set out to setup a local CentOS mirror for quicker PXE installations of my virtual machines. In the long run this will probably be superseded by a Spacewalk machine (update: discontinued on May 31, 2020) and until now has served me well. For the time being I just wanted a faster alternative.


On-Demand Socket Forwarding with Systemd

June 6, 2016
Systemd, Network, Database, Linux

Sooner or later when setting up a server you’ll want to create some MySQL databses and users. If you’re not proficient in writing SQL queries or just wanted to use a nice GUI tool for the task, you’d need to connect remotely to your databse host. But of course you do not want to expose your MySQL port to the internet … Or suppose you want to debug some remote service, which is only accessible locally on the remote machine …


Transforming an encrypted array from RAID 1 to RAID 6

May 16, 2016
Linux, Homelab, Encryption

Introduction # Some context # I have a NAS at home which runs on Debian Jessie. A NAS wouldn’t be a NAS without some storage, so I put in two disks with 4 TB each when I built it. Those two disks have actually been used in a setup with OpenMediaVault before that and already had a software-RAID on them. When migrating the disks (to Ubuntu at first) I learned about mdadm and that OpenMediaVault uses it. ...