[HN Gopher] An overview of single-purpose Linux distributions
___________________________________________________________________
An overview of single-purpose Linux distributions
Author : vyskocilm
Score : 139 points
Date : 2023-02-17 17:03 UTC (5 hours ago)
(HTM) web link (lwn.net)
(TXT) w3m dump (lwn.net)
| eschneider wrote:
| Interesting article. For folks who need to put together their own
| distro, especially for embedded applications, Yocto and Buildroot
| both lower the barrier to rolling your own and getting exactly
| what you need to something quite reasonable.
| nfriedly wrote:
| +1 for Buildroot!
|
| I haven't done much with Yocto, but I had very good experiences
| with Buildroot, particularly with getting helpful answers to
| noob questions I posted on stack overflow. One was answered by
| Thomas Petazzoni who, I think, is one of the main people behind
| Buildroot.
| eschneider wrote:
| I've used both in commercial products and I find Yocto to be
| more flexible than Buildroot, but the learning curve is less
| with Buildroot. Still, both get the job done and are
| reasonably documented and supported, so pick your poison. :>
| MichaelMoser123 wrote:
| Interesting that alpine didn't get mentioned, i thought that was
| the most common option for a slim Linux running inside
| containers.
| dharmab wrote:
| Alpine is a general purpose OS; You can run it as a desktop or
| server OS on real hardware.
| MichaelMoser123 wrote:
| still they do have a strong focus on size reduction, like
| using musl instead of glibc.
| slondr wrote:
| As pmOS folks (and anyone running alpine on their desktop
| or server) will happily tell you, size reduction is not a
| goal only relevant to container runtimes.
| squarefoot wrote:
| > You can run it as a desktop or server OS on real hardware.
|
| And it literally rocks at that. I would strongly encourage
| everyone with an old or small pc/laptop/sbc/whatever that is
| too resource limited to run a "regular" distro, to try Alpine
| on it. The amount of resources saved thanks to using musl
| instead of glibc is astounding.
| vanilla-almond wrote:
| Is there a minimal or custom Linux image suitable for the
| following scenario? A custom Linux + web app combination:
|
| - a Linux image that can upload to a VPS
|
| - a Linux image including your web app and essential tools (web
| server, database)
|
| - anything not needed from the Linux image is removed (tools,
| utilities)
|
| The idea is that a custom Linux image (which includes your pre-
| installed web app) can be installed to any VPS: pre-configured to
| be Linux only for your web app. (Note: this a scenario _without_
| docker.)
| deckard1 wrote:
| You can create your own.
|
| In the days before Docker what we would use is CentOS with
| custom scripts using Anaconda[1]. You start with the base
| system and then add on whatever you need. You can also
| configure /etc however you need. The output is an ISO of your
| own custom Linux distribution.
|
| One neat thing about Anaconda is you can add a provision script
| that runs on initial boot. So if you need to "bake" in your app
| but leave a certain amount of configuration for install-time,
| that's the way you do it.
|
| [1] https://access.redhat.com/documentation/en-
| us/red_hat_enterp...
| LeoPanthera wrote:
| This is one of those things that I've always been too scared to
| ask so I'm just going to ask it now: Is there a distro designed
| exclusively for running docker (and perhaps other) containers
| that also contains a friendly web UI for people who have no idea
| how docker actually works?
|
| I'm familiar with Proxmox, but it doesn't natively support
| docker.
| tych0 wrote:
| docker-the-company maintained
| https://github.com/linuxkit/linuxkit when I worked there. I
| have no idea who maintains it now, but it looks like it is
| still active (presumably still docker-the-company, since their
| adopters list [1] lists docker desktop).
|
| [1]:
| https://github.com/linuxkit/linuxkit/blob/master/ADOPTERS.md
| rz2k wrote:
| I've never used it, but your description made me think of
| Webmin that I used a long time ago, and apparently the same
| creators have developed Virtualmin and Cloudmin that give you a
| web interface for managing Docker images and containers.
|
| https://www.virtualmin.com/documentation/cloudmin/virtualiza...
| fraudster wrote:
| Kind of a left-field pic, and def not exclusively for running
| docker, but TrueNAS Scale offers a nice abstraction for running
| docker containers, with the simple webui interface you're
| asking for. I believe it uses K8s under the hood, and it's
| coupled with NAS software, but this seems maybe the closest to
| what you're asking for that I've seen.
|
| https://www.truenas.com/docs/scale/scaletutorials/apps/docke...
| dicknuckle wrote:
| RancherOS if you're looking to use something heavily tested but
| it's got a few weird features like most of the OS also being in
| containers. If you want something light to play with and get a
| vanilla docker experience, your best bet is likely Boot2Docker
| with Portainer.
| candiddevmike wrote:
| The existing RancherOS is no longer being maintained, you
| probably shouldn't be using it anymore:
|
| https://rancher.com/docs/os/v1.x/en/support/
|
| Rancher is working on a new version.
| mikepurvis wrote:
| When I last used Portainer on my home setup, the support for
| configuration-as-code deployment seemed pretty experimental--
| basically you could roll out a docker-compose config from a
| URL or upload as a one-off effort, but IIRC it had no ability
| to track that URL for changes, or update an already-deployed
| container set to a new configuration. I think you couldn't
| even give it a URL requiring authentication maybe?
|
| All of this left me feeling like the devs had different goals
| than I did as a user.
|
| But the current iteration seems like k8s/helm are first-class
| features now, so yeah, should definitely look again.
| bayank wrote:
| Its paid SW, but I like Unraid OS for this. It supports
| Dockers, VMS, and of course an easy to manage hard drive array
| with parity and ssd caching support. Just being able to chuck
| all your old drives that are laying around, add them to the
| pool and bring new life to old HW was worth it for me. The
| docker and VM support are nice extras.
| dwiechert wrote:
| You might look into Umbrel - https://umbrel.com/
| fsflover wrote:
| Depending on why you are asking, Qubes OS might be relevant for
| you.
| mardifoufs wrote:
| Proxmox with native docker support would've been a dream. I
| know, it's easy to add it on top (since it's basically a layer
| over debian), but you still wouldn't get the native GUI support
| and the proxmox features that come with it. I don't know why
| they are so keen on not adding docker, and only focusing on
| LXC. LXC is fine, but it's pretty clear that it is far from
| being as popular or commonly used as Docker.
| mikepurvis wrote:
| VMware has a thing that's basically this also:
| https://vmware.github.io/vic-product/
|
| But I've never quite understood the appeal. Is it about
| running untrusted containers with VM-level isolation? Or
| having a familiar GUI for managing and lifecycling them?
| Something else?
|
| Fundamentally, I worry that mixing VMs and containers is more
| likely to end up with the worst of both worlds rather than
| the best-- basically you get the slow bootup of starting the
| kernel every time, but none of the application-level benefits
| of sharing base layer storage or mounting the same shared
| volume to multiple containers at once.
| Fnoord wrote:
| With Proxmox since it allows you to run a VM you can run any
| OS with say a recent Docker version. On that OS, you can run
| a web GUI for Docker, using Docker. For example, Portainer.
| Nginx reverse proxy and done.
|
| Although personally, I prefer Podman over Docker.
| ThatMedicIsASpy wrote:
| Is this a desktop? Fedora Silverblue
|
| Is this a server? CoreOS
|
| Portainer or Cockpit for web UI
| GordonS wrote:
| VMware's Photon OS is largely designed as a container host -
| I've been using it for a few years now, and it's excellent. The
| team are really receptive to external contributors too (it's
| hosted on GitHub)!
| gjsman-1000 wrote:
| Closest thing is probably Synology... but it's pretty basic and
| you need to use the terminal for some advanced things. I don't
| know how much a GUI helps because there's still a lot of
| terminology that needs to be understood.
| Fnoord wrote:
| HypriotOS (for ARM), but it has not been in development since
| 2019 or 2020.
|
| Proxmox is neat and you can run any OS under the hood including
| the suggestions mentioned.
|
| You could also go for NixOS and declare you need OCI (e.g.
| Docker or Podman) in your Nix config.
| oso2k wrote:
| Fedora/RHEL have Cockpit, MicroShift, OKD, OpenShift Local,
| MiniKube, k3s, MicroK8s, TrueNAS SCALE
| blablabla123 wrote:
| Not sure if that's what you're looking for but there are
| Kubernetes distros. And yes, this also includes a relatively
| nice Web UI. But it's probably not easy to setup.
| JHonaker wrote:
| OpenSUSE MicroOS is basically built around the idea of an
| "immutable" (read disincentivized to change) core while the
| majority of user space runs in a Podman container.
|
| It was originally developed as an absolute minimal distro for
| running containers on servers, but the immutable desktop
| movement led them to develop a desktop user-facing variant.
|
| Other ideas that are very similar: Fedora SilverBlue (very
| similar, more mature) and VanillaOS (based on Flatpak insteak
| of Podman/Docker, very new)
| kccqzy wrote:
| If you install openSUSE these days during setup you have the
| option to set up the company as a "transactional server" with
| this immutable environment. I love that writing to /usr/bin
| fails with read-only file system. It's implemented as a read-
| only btrfs snapshot.
| imachine1980_ wrote:
| I'm sorry what these means?, can you explaine it again whit
| more details?
| candiddevmike wrote:
| You could argue that Docker Desktop is basically this.
| capableweb wrote:
| Docker Desktop is essentially an application, doesn't come
| close to being a OS or distribution.
| candiddevmike wrote:
| A VM to run containers is a fairly large part of Docker
| Desktop...? https://www.docker.com/blog/the-magic-behind-
| the-scenes-of-d...
| jaywalk wrote:
| It still requires a full underlying Windows or Mac OS, so
| it's irrelevant to the topic at hand.
| qbasic_forever wrote:
| They're asking for an OS their computer can boot into
| natively.
| hhh wrote:
| Not a distro, and don't know how far you can get without
| knowing much about docker, but you could deploy something like
| Portainer.
| trufas wrote:
| For the UI part cockpit [1] lets you manage containers (amongst
| many other things). I use it with fedora for my home server and
| rarely feel the need to drop into the command line in my day to
| day.
|
| [1] https://cockpit-project.org/
| [deleted]
| imwillofficial wrote:
| Hana Montana Linux is up there with Red Star Linux for my
| favorite distros
| jiggawatts wrote:
| As a person who only occasionally needs Linux for specific
| purposes, something I'd like is a well-supported mainstream
| distro for lightweight, high performance servers. Think NGINX,
| routers, local web proxies, that kind of thing.
|
| Something akin to BSD but Linux. Ideally something that supports
| a two-stage deployment where you compile for the exact target CPU
| and then the final thing has no extraneous components at all.
|
| Maybe Nix?
| qbasic_forever wrote:
| You say you need a distro which to me implies you want packages
| and a repository and updates, installation of packages on the
| fly, etc. But you also say you want to make a final image with
| nothing extra except your main apps, which makes me think you
| don't want a distro.
|
| I'd think about what your goals are and optimize for that use,
| it's going to be hard to do both the things you mention at once
| since they are somewhat at odds with each other. IMHO start
| with Debian, with minimal packages it's very slim yet you have
| the full power of their packages when necessary.
| Eisenstein wrote:
| Why not use BSD though?
| KronisLV wrote:
| > I'd like a well-supported mainstream distro for lightweight,
| high performance servers. Think NGINX, routers, local web
| proxies, that kind of thing.
|
| This might be a shot in the dark, but wouldn't Alpine Linux be
| a good general purpose candidate for this:
| https://www.alpinelinux.org/about/
|
| Many use it as a basis for container images, but it also runs
| pretty well as a regular Linux distro, albeit musl and busybox
| might present some compatibility challenges in some cases.
| Regardless, it seems to be pretty lightweight and widely
| supported, most software that you'd expect is also available
| and generally there are few surprises.
|
| It does have a somewhat short release lifecycle, though:
| https://endoflife.date/alpine
| sylware wrote:
| I have another type: a my-purposes-only elf/linux distro without
| all the kludge and bloat of the "other" purposes.
|
| :)
| iguessthislldo wrote:
| This isn't container-related like the article, but I recently
| came upon a specialized Linux in the wild. I bought a compact
| flash card off Amazon for to use as a drive in a Tandy 1000. I
| went to partition it and to my surprise it had a few partitions.
| One was an ext2 one that resembled some sort of root directory.
| Looking through the files, it appeared it was for a distro called
| AST Linux that was originally designed to run off compact flash
| and aimed at managing networked telephones. It also had firmware
| images for a Cisco SPA232D VOIP Adapter.
|
| https://www.astlinux-project.org/about.html
| taylodl wrote:
| I'd love to learn more about how you're using that Tandy 1000!
| legrande wrote:
| You can always have a vanilla Debian or vanilla Arch install and
| add things on an as-needed basis and build the OS from scratch,
| minimizing complexity and have them as single-duty OSes.
| klysm wrote:
| Yes but those aren't single purpose OS's like the ones
| described here. These typically come with immutability and a
| vastly reduced attack surface
| jacoblambda wrote:
| It can be if you use the right base OS. NixOS for all its
| issues checks most of the boxes for building a single purpose
| OS and the process of actually building one couldn't be
| easier. The whole process is effectively:
|
| 1. Write a config file
|
| 2. Run the command that builds the system
|
| 3. Test the system
|
| 4. (optional) Run the command that bakes the fresh system
| generated from the config into an image.
|
| 5. Deploy using either an image or NixOS's config based
| deployment tooling.
| candiddevmike wrote:
| The problem with single purpose OSs in my experience is
| adding stuff to them like kernel modules or drivers is such a
| pain in the ass that it negates the benefits. I'd rather just
| configure a general purpose OS to be immutable/have a reduced
| attack surface.
| vyskocilm wrote:
| FOSDEM talk about Fedora CoreOS, Ubuntu Core, openSUSE MicroOS,
| and Bottlerocket OS and how they all tackle the single purpose
| problem in their own way.
| parentheses wrote:
| Came looking for info on distros like Kali and other
| assemblages of tools for a particular purpose. Found this.
| dicknuckle wrote:
| There's also FlatcarOS if you want something more like the
| original CoreOS without the Fedora influences.
___________________________________________________________________
(page generated 2023-02-17 23:00 UTC)