[HN Gopher] Mkosi - Build Bespoke OS Images
___________________________________________________________________
Mkosi - Build Bespoke OS Images
Author : leetrout
Score : 53 points
Date : 2025-07-16 16:14 UTC (6 hours ago)
(HTM) web link (mkosi.systemd.io)
(TXT) w3m dump (mkosi.systemd.io)
| NewJazz wrote:
| I've been meaning to try this other tool
|
| https://github.com/osbuild/bootc-image-builder
| jordemort wrote:
| I've been having great success with this one at my day job.
| Being able to apply all the container workflows to VM images
| has been a boon.
| jauntywundrkind wrote:
| Does seem to support cross-architecture image building, which is
| a feature that's kept me on Debian's multistrap and now
| mmdebstrap.
|
| I should give this a go!
|
| The README's reference page has some good write-ups et cetera!
| There's a good "re-introduction" on Lennart (creator of systemd,
| mkosi) site, from the current maintainer.
|
| https://github.com/systemd/mkosi?tab=readme-ov-file#referenc...
| https://0pointer.net/blog/a-re-introduction-to-mkosi-a-tool-...
| pmarreck wrote:
| is this another case of "something that nix already definitively
| solves, but for the rest of us"?
| bsammon wrote:
| Or "something that nix already solve, but with documentation"
| bketelsen wrote:
| Normally I'd nod and smile at the nix documentation joke, but
| mkosi's documentation is the man pages, or the man pages.
| jraph wrote:
| It seems quite well written and easy to follow.
| mring33621 wrote:
| What's the use-case for this?
| mhitza wrote:
| Most likely context I'm going to try it is in a systemd-nspawn
| context. Lightweight process namespace ("containers") closer to
| the native modern linux server runtime (systemd all the way).
| its-summertime wrote:
| one image to deploy mostly without additional tooling on any
| systemd-based OS (which mounts the image and integrates the
| units from it), on a VM (just use it), or on bare metal
| (probably needs to be built on a full image but still can just
| use it assuming that is the case).
| af78 wrote:
| It is used by the systemd team to test systemd on a bunch of
| distros.
|
| https://github.com/systemd/systemd/blob/main/.github/workflo...
| miladyincontrol wrote:
| Yeah, systemd's particleOS relies on it. Pretty neat stuff
| deanputney wrote:
| Does this work for Raspberry Pi? Say for example I wanted to make
| an image that would auto-connect to my Tailscale network, or pre-
| install some software, would this be able to achieve that?
| sl-1 wrote:
| I use [pi-oven](https://github.com/keichi/pi-oven) for my
| raspberry images. Not perfect, but kind of works and removes a
| lot of hassle for the provisioning.
|
| Could not quickly find out from the project page an example on
| how to bake rpi images with mkosi, but the descriptions do
| point towards somewhat similar use case :shrug:
___________________________________________________________________
(page generated 2025-07-16 23:00 UTC)