<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl" media="all"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>Keyboard meet head
      </title>
        <link>https://kmh.prasil.info</link>
        <description>RSS feed for category Linux</description>
        <generator>Zola</generator>
        <language>en</language>
        <atom:link href="https://kmh.prasil.info/category/linux/rss.xml" rel="self" type="application/rss+xml"/>
        <lastBuildDate>Mon, 05 May 2025 00:00:00 +0000</lastBuildDate>
        <item>
            <title>On dishwashers and Nix</title>
            <pubDate>Mon, 05 May 2025 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/on-dishwashers-and-nix/</link>
            <guid>https://kmh.prasil.info/posts/on-dishwashers-and-nix/</guid>
            <description>&lt;p&gt;I have many unfinished blogposts about Nix. It is a very broad topic and it&#x27;s hard not to get lost half-way through writing it. So I decided to try something different. Get a bit more personal and try to write about one of my weird obsessions and about a piece of technology that I learned to appreciate.&lt;&#x2F;p&gt;
&lt;p&gt;One is dishwasher and the other is Nix. And you&#x27;ll be the judge which one is which. There surely is some kitchen sink joke in there, but let&#x27;s just dive right in.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>Look ma, no Hass!</title>
            <pubDate>Mon, 27 May 2024 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/look-ma-no-hass/</link>
            <guid>https://kmh.prasil.info/posts/look-ma-no-hass/</guid>
            <description>&lt;p&gt;I&#x27;ve been tinkering with &lt;a href=&quot;https:&#x2F;&#x2F;esphome.io&#x2F;&quot;&gt;ESPHome&lt;&#x2F;a&gt; recently, trying to add some air quality sensors to my household. There&#x27;s a lot of good tutorials out there, but they almost universally have one thing in common: they assume that the end goal is Home Assistant integration.&lt;&#x2F;p&gt;
&lt;p&gt;Which is cool piece of software, but I don&#x27;t have any use for it right now. All I want is to monitor few air quality parameters, send the metrics to metrics DB and render nice graphs in Grafana which I already have for monitoring other stuff.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>My favorite log aggregation service</title>
            <pubDate>Mon, 20 May 2024 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/my-favorite-log-aggregation-service/</link>
            <guid>https://kmh.prasil.info/posts/my-favorite-log-aggregation-service/</guid>
            <description>&lt;p&gt;Previously, I &lt;a href=&quot;https:&#x2F;&#x2F;kmh.prasil.info&#x2F;posts&#x2F;my-favorite-home-lab-metrics-service&#x2F;&quot;&gt;wrote about my favorite home lab metrics DB&lt;&#x2F;a&gt;. This time I wan to talk about another component of monitoring stack - about log aggregation.&lt;&#x2F;p&gt;
&lt;p&gt;Spoiler: this post is going to be about &lt;a href=&quot;https:&#x2F;&#x2F;grafana.com&#x2F;oss&#x2F;loki&#x2F;&quot;&gt;Grafana Loki&lt;&#x2F;a&gt; and how the promise of cost effectiveness and ease of operation works really well in the unique environment of home lab and small self-hosted networks.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>Sudo just a bit</title>
            <pubDate>Tue, 19 Mar 2024 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/sudo-just-a-bit/</link>
            <guid>https://kmh.prasil.info/posts/sudo-just-a-bit/</guid>
            <description>&lt;p&gt;The &lt;a href=&quot;https:&#x2F;&#x2F;www.sudo.ws&#x2F;docs&#x2F;man&#x2F;sudo.man&#x2F;&quot;&gt;man page&lt;&#x2F;a&gt; says that &lt;em&gt;sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy&lt;&#x2F;em&gt;. However most of the sudo use that I&#x27;ve seen&#x2F;done is really a privilege escalation with switched user being just a consequence of that. Even the &lt;a href=&quot;https:&#x2F;&#x2F;xkcd.com&#x2F;149&#x2F;&quot;&gt;famous XKCD 🥪&lt;&#x2F;a&gt; webcomic shows sudo being used in this way. Most of the time this small difference does not really matter, but sometimes it&#x27;s really inconvenient.&lt;&#x2F;p&gt;
&lt;p&gt;This is mostly a note I&#x27;ve written for my self so that I can quickly recall how to &lt;code&gt;sudo&lt;&#x2F;code&gt; when I really only want to &lt;code&gt;do&lt;&#x2F;code&gt; something without the &lt;a href=&quot;https:&#x2F;&#x2F;www.mankier.com&#x2F;1&#x2F;su&quot;&gt;&lt;code&gt;su&lt;&#x2F;code&gt; part&lt;&#x2F;a&gt;. Let&#x27;s have a look at another less popular  but sometimes quite a bit more appropriate option.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>NixOS on Contabo</title>
            <pubDate>Mon, 26 Feb 2024 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/nixos-on-contabo/</link>
            <guid>https://kmh.prasil.info/posts/nixos-on-contabo/</guid>
            <description>&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;contabo.com&#x2F;en&#x2F;&quot;&gt;Contabo&lt;&#x2F;a&gt; is an EU-based VPS provider with reasonably affordable pricing. However, it does come with some compromises. The billing structure is monthly with a setup fee, making it more suitable for specific workloads. Another limitation is the limited official OS support, specifically the absence of NixOS as an option. Online resources on setting up NixOS on Contabo are scarce and can be clunky or outdated. Here&#x27;s my approach that&#x27;s hopefully easy to follow.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>Lenovo P500 remote management via serial port</title>
            <pubDate>Thu, 13 Apr 2023 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/lenovo-p500-serial-access/</link>
            <guid>https://kmh.prasil.info/posts/lenovo-p500-serial-access/</guid>
            <description>&lt;p&gt;Outside of very specific deployments and industries, serial port on a modern hardware - &lt;em&gt;if&lt;&#x2F;em&gt; present - is usually overlooked and completely ignored. Over the years it became the floppy of external ports. These days one is more likely to see it as an icon representing I&#x2F;O port than to physically use it.&lt;&#x2F;p&gt;
&lt;p&gt;Which is exactly why I also didn&#x27;t see it for what it was - a simple, yet elegant solution to my particular problem. Because as it turns out, serial port still has much to offer even in 2023.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>HTTP 500 - Very internal server error </title>
            <pubDate>Tue, 04 Apr 2023 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/http-500-very-internal-server-error/</link>
            <guid>https://kmh.prasil.info/posts/http-500-very-internal-server-error/</guid>
            <description>&lt;p&gt;As far as downtimes go, most suck. Then there are some that are more like happy little opportunities to learn something new. When Gitlab in my homelab started returning &lt;code&gt;500&lt;&#x2F;code&gt;s, I had no idea how blessed I was. I was at best annoyed.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>My favorite home lab metrics service</title>
            <pubDate>Thu, 26 Jan 2023 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/my-favorite-home-lab-metrics-service/</link>
            <guid>https://kmh.prasil.info/posts/my-favorite-home-lab-metrics-service/</guid>
            <description>&lt;p&gt;Looking at my git history, I&#x27;ve been happily running InfluxDB for &lt;em&gt;years&lt;&#x2F;em&gt;. However nearing the end of 2021, after long time of peaceful coexistence among my monitoring services, some more or less pressing problems emerged:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The long-term future of InfluxDB &lt;code&gt;1.x&lt;&#x2F;code&gt; is uncertain, it&#x27;s pretty clear that I&#x27;ll have to migrate to &lt;code&gt;2.x&lt;&#x2F;code&gt; in foreseeable future.&lt;&#x2F;li&gt;
&lt;li&gt;Memory usage becomes a bit problematic. Well, that&#x27;s quite an understatement. The container ran out of memory frequently and I had to bump up the limit couple times already. Despite that, I can&#x27;t even graph longer time spans without getting InfluxDB OOM killed and it&#x27;s at this stage &lt;em&gt;by far&lt;&#x2F;em&gt; the most memory intensive service I ran. There are presumably some improvements in InfluxDB &lt;code&gt;2.x&lt;&#x2F;code&gt; that could help here.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The solution seems pretty obvious, however in the end this post isn&#x27;t really about InfluxDB.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>LXC and the mystery of lost memory</title>
            <pubDate>Mon, 21 Feb 2022 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/lxc-lost-memory/</link>
            <guid>https://kmh.prasil.info/posts/lxc-lost-memory/</guid>
            <description>&lt;p&gt;In my homelab I use LXD&#x2F;LXC quite a bit. Linux containers provide pretty
decent alternative to full blown virtualization with smaller overhead
and some extra perks like easier local filesystem access. All things
considered, I’ve been happy with LXD for many years.&lt;&#x2F;p&gt;
&lt;p&gt;However there are places where the illusion of completely separated
virtual machines shows some cracks when you look close enough. This is a
story of one such crack that was haunting me for months.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>Docker in WSL2 (the right way ++)</title>
            <pubDate>Fri, 18 Feb 2022 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/docker-in-wsl/</link>
            <guid>https://kmh.prasil.info/posts/docker-in-wsl/</guid>
            <description>&lt;p&gt;This is an extension of very helpful article &lt;a href=&quot;https:&#x2F;&#x2F;dev.to&#x2F;felipecrs&#x2F;simply-run-docker-on-wsl2-3o8&quot;&gt;Running Docker on WSL2
without Docker Desktop (the right
way)&lt;&#x2F;a&gt; by Felipe
Santos. My post attempts to go further and solve a very specific issue
within WSL - the absence of nftables support. This is something you
might not encounter unless you start running docker in docker or attempt
to run docker images that rely on nftables support in some way.&lt;&#x2F;p&gt;
&lt;p&gt;I tend to use &lt;a href=&quot;https:&#x2F;&#x2F;molecule.readthedocs.io&#x2F;&quot;&gt;Molecule&lt;&#x2F;a&gt; quite heavily
and I often end up using docker to emulate actual full blown linux
systems or kubernetes cluster in a container, which is where the absence
of some kernel features shows up.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>VFIO GPU pass-through on Dell R710</title>
            <pubDate>Thu, 05 Mar 2020 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/vfio-on-dell-r710/</link>
            <guid>https://kmh.prasil.info/posts/vfio-on-dell-r710/</guid>
            <description>&lt;p&gt;There’s a plenty of articles out there on VFIO GPU pass through
out there, so I’ll skip many of those details here to let us focus
on stuff that’s somewhat specific to Dell R711.&lt;&#x2F;p&gt;
&lt;p&gt;Before we get to the nitty gritty details of the whole setup, just a
short warning: If the GPU pass through is the only use case you want to
cover, starting with Dell R710 is absolutely not the way to do it.&lt;&#x2F;p&gt;
&lt;p&gt;Here’s why:&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>Running Kubernetes cluster with docker-compose for fun (and profit)</title>
            <pubDate>Mon, 27 Nov 2017 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/kubernetes-with-docker-compose/</link>
            <guid>https://kmh.prasil.info/posts/kubernetes-with-docker-compose/</guid>
            <description>&lt;p&gt;This could&#x27;ve been called &quot;Learning Kubernetes the hard way&quot;, because
that&#x27;s basically what I was trying to achieve here. It wasn&#x27;t so much
about learning how to use Kubernetes via its ingenious API as it was
about learning about its individual components. If you want to just run
Kubernetes locally, there&#x27;s
&lt;a href=&quot;https:&#x2F;&#x2F;kubernetes.io&#x2F;docs&#x2F;getting-started-guides&#x2F;minikube&#x2F;&quot;&gt;Minikube&lt;&#x2F;a&gt;,
that will give you nice VM with everything already set up.&lt;&#x2F;p&gt;
&lt;p&gt;What I&#x27;ve wanted to achieve is to have a set of components, all nicely
isolated with a well defined connection between each other so I can add
them, remove them and break the connections and see how this affects the
cluster. To put it simply I was interested in Ops side of running
Kubernetes. This is why I took
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;kubernetes&#x2F;kubernetes&#x2F;tree&#x2F;master&#x2F;cluster&#x2F;images&#x2F;hyperkube&quot;&gt;Hyperkube&lt;&#x2F;a&gt;
and mixed it with docker-compose and tried to stand up Kubernetes &quot;from
scratch&quot;.&lt;&#x2F;p&gt;
&lt;p&gt;Let&#x27;s get started..&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>Docker containers with Systemd and Ansible</title>
            <pubDate>Wed, 05 Oct 2016 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/docker-containers-with-systemd-and-ansible/</link>
            <guid>https://kmh.prasil.info/posts/docker-containers-with-systemd-and-ansible/</guid>
            <description>&lt;p&gt;Earlier on I&#x27;ve shown you &lt;a href=&quot;https:&#x2F;&#x2F;kmh.prasil.info&#x2F;posts&#x2F;rebuilding-nas-with-zfs-and-docker&#x2F;&quot;&gt;how I run docker containers on NAS using
systemd&lt;&#x2F;a&gt;. This time, I&#x27;ll show you an easy
way to configure systemd with &lt;a href=&quot;https:&#x2F;&#x2F;www.ansible.com&#x2F;&quot;&gt;Ansible&lt;&#x2F;a&gt; that
will get you running containers in no time. (and in reproducible and
automated way)&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>Continuous integration at home with Drone</title>
            <pubDate>Fri, 16 Sep 2016 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/ci-at-home-with-drone/</link>
            <guid>https://kmh.prasil.info/posts/ci-at-home-with-drone/</guid>
            <description>&lt;p&gt;Has science gone too far? It might look so, because:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;It feels like a huge over-engineering to implement CI at home.&lt;&#x2F;li&gt;
&lt;li&gt;What would you integrate anyway?&lt;&#x2F;li&gt;
&lt;li&gt;Just why?&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Well let me explain my reasons.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>Automatic SD card backup with USBmount</title>
            <pubDate>Thu, 09 Jun 2016 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/automatic-sd-card-backup-with-usbmount/</link>
            <guid>https://kmh.prasil.info/posts/automatic-sd-card-backup-with-usbmount/</guid>
            <description>&lt;p&gt;As I&#x27;ve mentioned before, I&#x27;m using &lt;a href=&quot;https:&#x2F;&#x2F;kmh.prasil.info&#x2F;posts&#x2F;rebuilding-nas-with-zfs-and-docker&#x2F;&quot;&gt;HP Microserver Gen8 as a small home
NAS&lt;&#x2F;a&gt;. There is a lot of stuff stored there,
but the primary reason why I actually started using NAS (back then slow,
but &lt;a href=&quot;http:&#x2F;&#x2F;dns323.kood.org&#x2F;&quot;&gt;hackable&lt;&#x2F;a&gt; D-link DNS-323) was to store my
photo collection. With ZFS, mirrored drives and extra backup to off-site
location, the data on it should be reasonably safe, right? However
that&#x27;s not all that useful if most of the recent photos reside on the SD
card inside the camera on in the case somewhere, just because I didn&#x27;t
have time to copy them to the NAS yet. So what can we do about it if we
have 15 minutes to spare? Let&#x27;s automate it a bit!&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>Rebuilding NAS with ZFS &amp; Docker</title>
            <pubDate>Wed, 01 Jun 2016 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/rebuilding-nas-with-zfs-and-docker/</link>
            <guid>https://kmh.prasil.info/posts/rebuilding-nas-with-zfs-and-docker/</guid>
            <description>&lt;p&gt;It all started with tripped breaker. In fact it tripped multiple times
before I got home. Luckilly the spinning rust drives with data survived
that without any issues, but the flash drive didn&#x27;t. So with system
FUBAR and some (little) time on my hands, there&#x27;s only one thing to do -
upgrade.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>Pushing the check states from Xymon to Graphite</title>
            <pubDate>Fri, 27 May 2016 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/xymon-to-graphite/</link>
            <guid>https://kmh.prasil.info/posts/xymon-to-graphite/</guid>
            <description>&lt;h1 id=&quot;motivation&quot;&gt;Motivation&lt;a class=&quot;anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;🔗&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Chances are, you never heard about &lt;a href=&quot;https:&#x2F;&#x2F;www.xymon.com&#x2F;&quot;&gt;Xymon&lt;&#x2F;a&gt;
(formely Hobbit), so let me give you some idea. It&#x27;s actually pretty
decent monitoring system - if you still live in 90s. :D But hey, let&#x27;s
give credit where it&#x27;s due, compared to other systems at that time, it
was reasonably fast, has quite easy to understand configuration, comes
with many standard checks out of the box and comes with a web interface.
Probably that&#x27;s why some people still use it to this day.&lt;&#x2F;p&gt;
&lt;p&gt;In our company it&#x27;s one of those legacy systems, that we need to
replace, so as a first step, let&#x27;s see if we can get some of the data
out while we&#x27;re still using it.&lt;&#x2F;p&gt;
</description>
        </item>
        <item>
            <title>Using Docker with ZFS storage driver</title>
            <pubDate>Fri, 04 Mar 2016 00:00:00 +0000</pubDate>
            <link>https://kmh.prasil.info/posts/docker-on-zfs/</link>
            <guid>https://kmh.prasil.info/posts/docker-on-zfs/</guid>
            <description>&lt;h1 id=&quot;introduction&quot;&gt;Introduction&lt;a class=&quot;anchor&quot; href=&quot;#introduction&quot; aria-label=&quot;Anchor link for: introduction&quot;&gt;🔗&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;So I&#x27;ve ended with this ZFS and Docker combination on my home storage
some time ago. I use &lt;a href=&quot;http:&#x2F;&#x2F;zfsonlinux.org&#x2F;&quot;&gt;ZFS on Linux&lt;&#x2F;a&gt; to safely
store data and I use &lt;a href=&quot;https:&#x2F;&#x2F;www.docker.com&#x2F;&quot;&gt;Docker&lt;&#x2F;a&gt; to run services
like samba, plex, owncloud, and others on top of that data.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ve been using devicemapper on top of ZFS and it was mostly good. Every
now and then I had this strange issue of layer not being available while
starting container, (as if docker tried to spin up the container before
having the storage ready for it) just re-running the container solved
the issue. I&#x27;ve never seen this at work, where we use Docker in
production quite a lot and in my case it was transparently handled by
upstart so I&#x27;ve just assumed the combination of devicemapper and ZFS
caused these. Besides that I was quite happy with the whole system.&lt;&#x2F;p&gt;
&lt;p&gt;Recently I was wondering if there was some progress on the &lt;a href=&quot;https:&#x2F;&#x2F;docs.docker.com&#x2F;engine&#x2F;userguide&#x2F;storagedriver&#x2F;zfs-driver&#x2F;&quot;&gt;ZFS storage
backend&lt;&#x2F;a&gt;
and I was pleasantly surpriset, that this is actually built in sice
couple versions ago. (how did I miss that, I have no idea) So let&#x27;s try
it?&lt;&#x2F;p&gt;
</description>
        </item>
    </channel>
</rss>
