top | item 34962914

Linux-factory: A framework used to create custom Linux Debian operating systems

189 points| nixcraft | 3 years ago |github.com | reply

82 comments

order
[+] temp2302271148|3 years ago|reply
I prefer the approach of AntiX and MX Linux. Start from a clean live distro, mod it to your taste, master it to a new Live ISO. You can also start from a normal MX/antiX system and make a live ISO backup. You can also install those ISOs. Systemd is optional on MX and disabled by default. LOTS of live and remaster options on those systems. I find myself more on live than on installed systems now. It's basically like working with FS snapshots.

A similar distro with remaster tools based on Devuan is Refracta.

There used to be the Debian Live project but it looks obsolete. EDIT: sorry I misread the bug reports, it is OK https://live-team.pages.debian.net/live-manual/html/live-man...

[+] rektide|3 years ago|reply
There's almost no circumstance I can imagine where giving up a solid usable well known OS sounds tempting to me. Getting Debian running on PogoPlugs and OpenWRT devices has been a repeated ordeal I'vd gladly traversed. Having a well behaved normal OS that meets many user's expectations (but has your special stuff regularly installed!) is divine.

I used to run Debian Live, and appreciated the tiny amount of shell hacking they have to layer persistent storage filesystem atop a ro filesystem- identical to how theres a ro container image then the mutable rw layer atop it... but a decade older!

I find that the pretense of running "live" is largely gone. It's basically become a meaningless difference of what medium you run on but I've been using the same scripts to create the necessary root OS & UEFI EFI filesystem (FAT32 with a magic partition-type, populated with the bootloader & config). often I spin up systems by just copying a btrfs snapshot & rsync'ing efi directory (and updating some partition uuid's, regenerate machine-id), then I have two systems. Live feels meaningless, non-distinct from regular to me.

All these attempts to treat things different & distinctly, to make special cases for ourself- oh we need a network/router oriented OS, we need a bare OS, we need a consumer OS, we need a NAS os- so rarely have I ever felt like these attempts to flee from the fold & venture out to special really have rewards. This behavior of making exceptions for your problem, talking yourself out of doing the easy normal base thing, seems so rarely to me to have rewards. Run Debian, run systemd, run normal well-known tools! Unless you're really certain getting off the base path really is essential, has huge specific merit.

That's why I like this effort. It allows customization & baking your own thing, but it's much more routine & regular & normal than so many "make your own OS" projects, where folks tend to be quite "back to the land" in motive. Let's make our own OS from sticks! Yeah! But no. You almost certainly should have an ok userland base in my view. Debian is a pretty great one.

[+] neilv|3 years ago|reply
If anyone wants to build with/atop Debian Live, I did a couple projects years ago where I wrote wrappers that might still be good starting points:

* LilDeb, a USB multi-tool designed for 256MB (like when you couldn't find a Linux box, but you could find a Windows PC), with careful separation between read-only OS, ephemeral data, and persistent data. One shell script builds the entire thing, including the various config files. https://www.neilvandyke.org/lildeb/

* Rackout, start to a living room media appliance project that was going to provide some examples for my (abandoned) Racket book. If you happen to want to use Racket to do things like repartition a disk or build a distro image, some of the libraries I wrote might come in handy. https://www.neilvandyke.org/rackout/

[+] gregmac|3 years ago|reply
How do you maintain this as new base releases are made?

Ie: Do you just manually reapply your changes every time? Or just do in-place upgrade and then snapshot that?

Personally, by the second time I did this, I'd be writing a script. Then I'd want to script the running of the script.. and before you know it you end up with a framework..

[+] clayrisser|3 years ago|reply
This project is a product of 4 years of work, mostly learning the Debian ecosystem. I started with Ubuntu, I’ve tried Arch, I’ve tried Gentoo, but nothing beats the ease of Debian when it comes to custom distributions. Debian was almost built to fork. Their ecosystem is amazing. Their live build tool is super.

I built Linux Factory so everyone else can build custom Debian distributions easily without having to know the live-build tool. It’s really easy to configure and get started. Please give me feedback on how I can make it better.

[+] ilovecaching|3 years ago|reply
Why not just use mkosi? There are so many tools that do this already and mkosi is cross distro and can do super modern stuff like use UKIs.
[+] groestl|3 years ago|reply
Thanks for the tool! Found a docu bug: the link in the "Grub" section does not point to the grub overlay :)
[+] jayp1418|3 years ago|reply
Thanks for tool. Will there be GUIed version in future ? Like Suse had previously ?
[+] clayrisser|3 years ago|reply
Hey just noticed all the activity here. I’m the author of Linux factory. I just opened up issues on GitHub so more discussion can happen there.
[+] tannhaeuser|3 years ago|reply
Congrats and thanks. Not sure people interested in Debian want to contribute to the borg producing copilot and chatgpt based on their work on gh, among other things.
[+] adampzakaria|3 years ago|reply
This sounds like something I'd be very interested in, though I'm not sure what it is.

It'd be great if I could easily customize Debian (i3, vim, zsh, chrome, etc.) and distribute / share it with others.

But I'm not sure what this does and cannot tell even after reading the first few sections of the README.

[+] clayrisser|3 years ago|reply
As the author of Linux Factory, that’s exactly what I built it for. I would love to help guide you and get you started on your project. Please create an issue in the GitHub project and I’ll further guide you there.
[+] pabs3|3 years ago|reply
There are a ton of Debian system build tools out there and people keep making new ones:

https://wiki.debian.org/SystemBuildTools

[+] ranting-moth|3 years ago|reply
There's nothing wrong with making new tools. I love making my own tools, both physical tools and software tools.

The feeling you get from it is great! Plus, this is often how new things (or ways to do things) are discovered.

[+] phani25|3 years ago|reply
I recently had the opportunity to use Linux-Factory, and I must say that I'm thoroughly impressed with this operating system. It's clear that the Author behind Linux-Factory have put a lot of thought and effort into creating a streamlined and user-friendly experience that makes it easy to get things done.

One of the standout features of Linux-Factory is its speed and performance. This operating system is lightning-fast, and it runs smoothly even on older hardware. Additionally, the user interface is clean and intuitive, making it easy to navigate and customize to suit your preferences.

Another great thing about Linux-Factory is its versatility. Whether you're a developer, a gamer, or just someone who wants a reliable operating system for everyday use, Linux-Factory has something to offer. The software package selection is robust and well-curated, with all the tools and applications you need to get work done or enjoy your leisure time.

Overall, I highly recommend Linux-Factory to anyone who is looking for a fast, reliable, and versatile operating system. The Author have done an excellent job creating an operating system that surpasses expectations, and I look forward to seeing what they have in store for future updates. Thank you for creating such an amazing product......!

[+] alex_smart|3 years ago|reply
Linux-factory: A framework used to create custom Linux Debian ~~operating systems~~ installers

FTFY

[+] dharmendra_123|3 years ago|reply
Linux Factory sounds like a fantastic tool that could benefit a lot of people who want to build their own custom Debian-based distributions. It's awesome that you've made it accessible even for those who aren't familiar with the live-build tool.

In terms of feedback, it might be helpful to include some tutorials or guides for those who are completely new to the process of building custom distributions. Additionally, having a user community where people can share their experiences and ask questions could be really valuable.

[+] Harikittu46|3 years ago|reply
Linux-factory is a powerful and innovative open-source project that is making it easier than ever before for developers and Linux enthusiasts to create custom Debian-based operating systems. Whether you're a seasoned developer or a newcomer to the Linux world, Linux-factory is definitely worth checking out!Great work @clayrisser sir...!! Hope you will reach many more milestones in future sir..!!
[+] groestl|3 years ago|reply
No offense, but this from a new account makes it look suspicious.
[+] ladyanita22|3 years ago|reply
Why are these things always for Debian based distros, but never for Fedora ones?
[+] SuperSandro2000|3 years ago|reply
Why not use a distro that has the literally built in?
[+] Conan_Kudo|3 years ago|reply
What would you like to see for something like that?
[+] tmoney75|3 years ago|reply
Oh, hey!!! Did you know that RHEL, CentOS Stream, & Fedora has been providing an image builder for a couple of years? All of these links below demonstrate functionality that you can do with CentOS Stream & Fedora, and even with the no-cost developer subscription for RHEL which unlocks 16 RHEL subs with tons of extra functionality. Many links below to help you easily learn to use it. We are actually using this tooling internally to beging building all of the image artifacts for all three of these linux distros. Eating our own dogfood; this is the future.

Also, below are links and some screenshots of the wicked cool new customizations that just landed in CentOS Stream and should come to RHEL 9.2 and Fedora soon.

- Install in your local Fedora/CentOS Stream box

dnf install -y osbuild-composer composer-cli cockpit-composer bash-completion systemctl enable --now osbuild-composer.socket systemctl enable --now cockpit.socketfirewall-cmd --add-service=cockpit && firewall-cmd --add-service=cockpit --permanent source /etc/bash_completion.d/composer-cli

- RHEL Image Builder | Into the Terminal 53 youtube podcast https://www.youtube.com/watch?v=H-mv_WLmQdA - Blog: https://www.redhat.com/en/blog/using-no-cost-developer-subsc... - Blog: https://www.redhat.com/en/blog/announcing-full-support-new-r... - Upstream docs https://www.osbuild.org/guides/blueprint-reference/blueprint... - RHEL 9 docs https://access.redhat.com/documentation/en-us/red_hat_enterp...

Screenshots - https://github.com/tabowling/Fedora-Virt-Lab/blob/master/cs9... - https://github.com/tabowling/Fedora-Virt-Lab/blob/master/cs9...

Please give us feedback, feature requests, tell us how you're using it, pull requests at our upstream project https://github.com/osbuild Happy building!

[+] csdvrx|3 years ago|reply
Debian and Ubuntu are nice, but not exactly bleeding edge.

IMHO arch is far better, and comes with an extra bonus: you can use pacman just like on MSYS2 (Windows)

[+] Lindby|3 years ago|reply
In a lot of situations, stable is better than bleeding edge. It depends on the use case.

For example, my personal computer is running Debian Sid (i.e bleeding edge, dev track) while my computer for work is using the latest Debian stable.

[+] culopatin|3 years ago|reply
I use arch btw. It’s better because we the arch users say so. I’m an arch user btw.
[+] rc00|3 years ago|reply
If you want bleeding edge Debian as a rolling release, sid is there. It's all a matter of preference.
[+] alangibson|3 years ago|reply
Seems vaguely similar to Armbian?
[+] palata|3 years ago|reply
To be fair, there are tens of projects out there dedicated to creating custom rootfs...
[+] neatze|3 years ago|reply
Is there anything that makes it worth to switch from debian live-config scripts ?
[+] clayrisser|3 years ago|reply
- overlays (basically you can separate configuration into separate units)

- templating support

- configuration in yaml files

- it still fully supports live-build support, so it should be super easy to migrate. You just put the live build files in os/lb or in the lb folder of an overlay.

[+] TeeMassive|3 years ago|reply
It's like Yocto but made saner (although with less options)
[+] kkielhofner|3 years ago|reply
The real value with Yocto is the community and vendor supported/supplied BSPs (board support packages). The gains from these (typically extensive and robust) BSPs usually more than offsets other rough edges with Yocto.
[+] tleb_|3 years ago|reply
I'd be interested in knowing what you consider not sane in Yocto?
[+] not_the_fda|3 years ago|reply
Yocto is fine if you are using a SOM and the vendor provides a yocto BSP.

If are building your own board and developing a BSP, Yocto is a nightmare peeling away the onion layers.

I find Buildroot much saner and easier to work with.

[+] not_the_fda|3 years ago|reply
How is this different / better than live-build?
[+] clayrisser|3 years ago|reply
It’s easier to use. It actually uses live-build under the covers, and even supports enabling you to tap into the live build system directly.

A couple of things it supports that live build does not support.

- overlays (basically configuration modules)

- templating

- python hooks

[+] 2OEH8eoCRo0|3 years ago|reply
Any color you want, as long as it's black.
[+] prettyStandard|3 years ago|reply
Finally I can have my own distro complete with bugs.