Build your own distro and become your own maintainer

I’ve posted here in the past about building your own agent harness and self hosting your own LLM models. Fun stuff, but why not your own operating system - with AI?

The reality of a fully clean-slate OS build might not be realistic (yet..), even with the best models we have, but using your own harness (you built one right? It’s fine you can use any of them) and your own self hosted AI models (or cheap hosted ones, no one is judging) , you too can build your own fully custom Linux distro!

Why would you want to do this? Isn’t this a terrible idea? Because you can, and probably. If you still want to do it (I believe in you!), the best way to start is point your agent at pengyos/SPEC.md at main · patw/pengyos · GitHub and get it to explain how this distro was built, and what components it has, then discuss your own needs, the desktop environments you like, the build tools you prefer, even fun stuff like desktop backgrounds and theme options. Even fully custom apps you’d want to add to the OS that are for just you. Get the agent to set up a project space for it, and start iterating. Within 1 night you can probably have a bootable USB stick with your own (lightly) customized OS. Realistically, you’re probably in for about a month or two of back and forth, iteration and actual hardware testing. Once you’re done, post back here, because I want to see what you built and how you built it. The new world of open source is open ideas and sharing. Code is easy, agents pump all day long, but ideas and taste still matter a lot here. Show me what you got! (here’s mine: https://pengyos.catbee.ca )

If you want details (technically spoilers) read on:

  • First think about your base. For PengyOS I went with buildroot for this one because the idea of an A/B boot like SteamOS/Bazzite/Android seemed cool. Big disadvantages in update sizes and lack of package management, but we’ll get there in a bit. Alternatives are things like Yocto or basing off an existing distro, or even trash can distro where you just yeet things (partion, format, grub, kernel, systemd, userland, etc) onto a drive and it’s a one of a kind setup. Making a custom arch or debian is always on the table if everything else like security updates sounds scary.
  • Think about what versions you want. Did you want to focus on a sever thing? Just build it with all the stuff you use, and maybe make a web control panel for it. Desktop? Pick a DE and run with it. COSMIC was my choice, but KDE/Gnome are fine. nvidia drivers are a little tricky, but the full image systems actually make that simpler.
  • Do you hate rust userland? You’re objectively wrong but use the regular gnu coreutils. Do you want old sysvinit instead of systemd? Systemd haters are not allowed, but sure go for it.
  • Packaging: Image based distros can use Flatpak, podman/docker, and distrobox. Or make your own! If you have a limited set of packages even systemd extensions are probably ok. If you derive from an existing distro you have less things to worry about but also… if you want the newest stuff you might need to make your own package repo (Still easy, do it!)
  • Updates: This is where it gets more interesting, I suggest building the observer/act loop in your agent to evaluate when core components are updated upstream, or CVEs are issued so it can download, patch and push. This part took the longest for me, it’s a lot of decisions.
  • Extra apps/features: If you’re doing desktop, all the DEs come with lots of built in, useful apps and lots of 3rd party stuff. Add whatever you want to the base, and then get your agent to build stuff that just doesn’t exist. I built printer and gamepad management, and disk management utils that I couldn’t find in Cosmic. They look great!
  • Theming: Do it. AI generated slop images. Stop letting reddit tell you AI is bad. This is YOUR house, you play by YOUR rules. Slop it up.
  • Image hosting/web pages/gitub: This is really up to personal preference, but there’s a STRONG theme of self hosting in this forum, so go ask those guys how to run that server in your closet… which could be running your own distros server edition! If all that scares you, lots places online to host.
  • Testing: Your agent can test and catch about 90% of the issues. The last 10% is you booting up images to see if your nvidia box is going to puke on load. Give your agent full root on the test machines and qemu vms so it can find and fix everything in real time, and then go back and update your build repo.
  • Models: You can get most of the way there with just Ornith 1.5 35b, further with Qwen 3.8 Flash Next and for the truly tricky stuff, some frontier will help save time. My project was probably 7 billion tokens or so, local AI will save you money. Do that or abuse the hell out of Claude Code or Codex limits.
  • Spreading Ideas: Tell your friends they can do this too. And your techie co-workers. There’s no rules anymore, anyone can build anything. Make a logo for your distro, get some t-shits and stickers printed. Wear it proudly.

I’ve posted this before on the L1T forums, but Linus and Luke have an opinion:

HTH!

In 2001 I printed out the whole Linux from Scratch book at university, took it home over the summer and took a week to compile my own Linux distro. I screwed up a bunch of permission recursively and had to rebuilt it, but it only took three days the second time.

I used that LFS for two full semesters before going to RedHat (pre Fedora). I was also the lab admin for the Computer Science department and was taught how to automate installs using anaconda-ks and a bunch of lab SSH scripts (long before Ansible, Pupplet, etc.) Used those same skills when I later had to maintain Linux machines in a call center. I could pop in a floppy disk and a new machine would be imaged in a few minutes and be given its own unique hostname (incrementing the number on the server during the install that recorded the MAC address).

I switched to Gentoo around 2003, which was basically LFS + package management.

Building my own Linux from scratch taught me low level skills around Linux and helped me later when I was in startups using embedded Linux systems.

I don’t take issue with anyone writing out all their specs to have an LLM try to create a custom distro, but I’m not sure how much you’d really learn about the internals and the skills that make a good Linux engineer.

That being said, I am looking at using agents to automate immutable images based on some distros/package managers.

Don’t take software engineering advice from someone who isn’t a software engineer. The Primeagen’s podcast had a bunch better takes on reverse engineering and bespoke software.

I definitely encourage young people or people interested in how a distribution is pulled together to try the project.

Personally I won’t bother for x86_64. But I do build and maintain my own heavily patched OpenWrt for BPI-R4.

For my PC, I have:

  • custom compiled and optimised kernel
  • vanilla ArchLinux userspace (and recently migrated to CachyOS repositories)

Sweet spot for old dogs like me.

Still need to watch this, but I vibecoded my own imageboard software to have the exact features I want, with consistency to import and export related metadata in a way that anyone else can easily parse. All because the software I had been using prior was still written in python, and guzzled ram like mad.

eric dubois started such a project to use SI :rofl: for the whole process of maintaining and deploying a own SI :poop: -assisted distro.

Is the SI, a reference to the trump cartel cybersquatting .si domains, then executive ordering the federal government to refer to AI, as SI?

As for vibe coding Linux from scratch… I guess it might be fun to not bother doing the learning thing, and just skip to the answer bit?
Cheating in this case, just removes personal learning, so no harm to anyone, and hopefully ends up with custom distro, that you have no real understanding of the make-up to maintain with future breakages. But, there is AI to help work through breakages later

Established distros, don’t teach you anything so you don’t learn anything under the hood, so this is a step up from them

Fun, with no harm to anyone else, is a good thing

re: learning linux

I think you’d be hard pressed to NOT learn a whole lot about how Linux works, in the process of doing this. Right now trying to “claude make me a leenooks distro, make no mistakes” will result in some really sub optimal choices. The back and forth discussion you’ll have to do, to figure out what compromises you want will teach you a lot about how everything works under the hood. The SPEC.md intentionally bakes in a lot of alternative choices that are designed as discussion points for the user, which should lead to a lot of “huh, what’s that used for?”. It’s even a win if people go through the process, learn a ton and then decide they just trust the Debian team to deal with all this stuff.

My own Linux journey started with 0.92, SLS, Yggdrasil and Slackware. I’ve learned nothing since then because I broke the rule: Don’t make your own distro. I’m thinking of making my own encryption algos next. Let make some bad choices!

I am interested in vibe coding/forking my own distro. I like the design of a declarative, reproducible immutable, and ability to independently compile packages of the package manager, but I don’t like the nix syntax, how dependent it is on systemd, the crappy steering committee.

I also want a desktop environment that has a windows 7/9 taskbar that works on multi-monitor setups with a window manager like gridmove. Right now I can get by with my current config. I haven’t gotten a chance blog about my latest config.

I documented my adventure here

These forks interest me

I linked these here

I vibecoded my own wayland compositor, but idk if that counts for anything.

(yes it’s stable, yes it does everything hyprland/sway/niri/etc can do, no crashes, yes it can do games/productivity, trust me, i studied architecture, libraries, wayland dependencies, etc, so it was planned and built line by line, no “make me gta6, make no mistakes” prompting here.)

Along side a few programs (system tray, program launcher, cooling software, rgb management, document editor, local ai harness, etc) that current offerings just didn’t match what I needed.

I maintain all my own stuff, and because i kept dependencies as close to zero as possible, updates wont wreck my programs. I still keep my eye out for better offerings, but im perfectly happy maintaining my own “distro” (if you could even call it that)

As for the kernel and system packages, I largely leave that up to Arch.

How it feels to interact with my computer is much more important to me than the nuts and bolts beneath the surface. No sense in spending time to make things that smarter and much more capable people could make better.

After all, consensus is shifting from:

  • No AI
  • Disclose if AI
  • Who cares what tools you use, but YOU hold responsibility

It’s a tool amongst others, if the code is shit, you the maintainer will be called out.

You might be able to customize on an existing WM, then carry that config as the default for your distro. If it’s not possible on any WM currently then yeah, just vibe it. The idea of Nix, but in a more human declarative language or even something Gradle or a Ruby DSL like… could be interesting.

That’s cool as hell. Is it up on github?

Nope, the code is hard-coded for me and my machine, I would only share if people wanted it to adapt it, or learn from. But, since I vibecoded it, it has no value, as it can be easily replicated by AI. The code base is roughly 3.5k loc, not hard for a frontier model to output.

I also have no interest in dealing with “you should of done this” people.

Here’s a writeup I did about it; https://onewireout.com/writeups/resonance/

(Not selling anything, not trying to get fans, or marketing or something, it’s just like a blog of sorts, I can take it down if mods no like)

I already do that. Of sorts.

I looked into Yocto early on, but decided on buildroot because it seemed more hackable. That being said, every time I run into buildroot related madness I wonder if I made the right choice. I’m carrying quite a few patches nowadays. And by me I mean the agent and I shouldn’t feel any anxiety over it, but as a washed up developer, I still feel it.

Yeah I was thinking mangowm and quickshell

Common misconception. Yocto has more guardrails, sure. But you can do whatever with either.

As soon as your project grows beyond bootable kernel with a few utilities, though, Yocto has the upper hand. Way more standardized, way clearer rules, way easier build reproducibility and makes CI/CD easy.