Live data from Hacker News

Introduction to Immutable Linux Systems

dataswamp.org

131–140 of 164 posts

Re: Introduction to Immutable Linux Systems

#131
post #96

Earlier quoted context omitted.

Tangential, but I had my mind blown in about 2009 by a big hypervisor running Windows remote desktop hosts. I believe it was Citrix. The VMs booted from images. The image and the mutable differencing disks were entirely in RAM (although user profiles were on spinning rust). A desktop host for 25 users would boot to accepting remote logins in about 4 seconds. Least painful Windows system to patch.

> spinning rust Weird phrasing. Haven't seen that before.

If you Google it, it's a pretty common phrase referring to magnetic disk as opposed to SSD. Could even be applied to drum, I suppose, if you could still find any...

Re: Introduction to Immutable Linux Systems

#132

Earlier quoted context omitted.

You don't consume ostree directly like that, what happens is someone would make Debian ostree-enabled OCI images for users to consume and adapt. https://opendev.org/starlingx/apt-ostree is one such effort to bring ostree to debian.

EndlessOS (mentioned in the article) is a Debian derivative based on OSTree, in development since around 2016 (maybe earlier). You might find their forum (intended for end users, not much about development) or some of their repos useful: https://github.com/endlessm https://community.endlessos.com/

I'm familiar with endless (and their excellent team!). The current issue is that it doesn't support layering like Silverblue does via rpm-ostree.

I'd be awesome if there was a community effort around bringing the layering functionality and bootc enablement to all of Debian and then we could have our cake and eat it too!

Re: Introduction to Immutable Linux Systems

#133

Earlier quoted context omitted.

NixOS gives you precisely this kind of control- through a few different mechanisms. Some packages in nixpkgs, and most NixOS and home manager modules, expose a lot of configuration options where you can configure various plugins, add extra packages, etc. Nix also lets you provide overlays and overrides to add custom packages (new packages, or customized versions of existing packages) and gives you the option of chang…

Would you have any examples of this to hand? I've been trying to find a clean way to share an altered qemu derivation that isn't just me copying and maintaining the qemu/default.nix but so far that has been the easiest.

This post is a bit old now, and might not be entirely what you were looking for, but I wrote about getting my personal blog building with nix, including an example of using an overlay and patching and upstream dependency:

https://rebeccaskinner.net/posts/2021-06-06-nixifying-a-haky...

Re: Introduction to Immutable Linux Systems

#134

Off topic, but does anyone know how to find out where mutable data for NixOS modules are stored at (e.g. the data directory for a database) without reading the source? Occasionally, it's mildly annoying, and would be comforting to know with certainty where all my state is.

I’ve found that’s usually in /var or ~. Can’t think of any instance where it wasn’t one of those.

Re: Introduction to Immutable Linux Systems

#135
post #85

" system upgrades aren't done on the live system packages changes are applied on the next boot you can roll back a change Depending on the implementation, a system may offer more features. But this list is what a Linux distribution should have to be labelled "immutable" at the moment." Immutable. I do not think it means what you think it means.

Did you finish the article? The author brought up that point, with the caveat that they couldn’t think of a better term.

Re: Introduction to Immutable Linux Systems

#136

No mention of proprietary drivers such as nVidia's? §

They work perfectly fine on NixOS at least, can't speak for the others.

NixOS is in some ways the best distro for NVIDIA, because it just holds your upgrade back if there's a compatibility problem between the NVIDIA proprietary driver and the kernel, instead of breaking your system or installing a non-usable kernel alongside your working ones.

Re: Introduction to Immutable Linux Systems

#137
post #28

If you ran root on ZFS with a single mount / form, and snapshotted it immediately after install, would that count as "immutable" in this logic?

I'd say yes, to an extent, although you don't get all of the benefits of immutable Linux this way. A good immutable Linux distro does some work to make sure that

  - upgrades/changes are atomic
  - it's very clear whose responsibility it is to track what state, i.e., what parts of the filesystem are snapshotted and when
  - it's easy to revert to any snapshot at boot time
  - you're unlikely to have 'gaps' where you wish there was a snapshot but there isn't one
  - snapshotting applies to configuration changes as well as package (un)installation
You can get most of those benefits of the box on openSUSE or other distros where the default filesystem is copy-on-write and the package manager is configured to take snapshots for you. You can also get something like that for configuration management via etckeeper, which gives you version control for system-wide config files. A distro which only takes these steps may not always be considered 'immutable Linux' as immutable distros typically go further, either in limiting what changes are possible outside the blessed methods (which generate new snapshots) or how what kinds of configuration/persistence it manages. But at some point it's just a question of degrees.

As it happens, snapshotting with automatic reversion is an approach some take with NixOS to better ensure that its configuration management is comprehensive. You can force all of your persistence requirements to be explicit by reverting to an old snapshot on boot.

Blog post which (afaik) first presented this idea to the community: https://grahamc.com/blog/erase-your-darlings/

Common implementation for NixOS: https://github.com/nix-community/impermanence

Presentation on that implementation from NixCon 2023 (just a couple weeks ago!): https://www.youtube.com/watch?v=QtBouFMyrWg

Re: Introduction to Immutable Linux Systems

#139
Our team from Triton DataCenter & SmartOS[1] is also working on an immutable Linux distribution[2] based on Debian + ZFS + LXC.

Currently this is supported on Triton DataCenter only, but our internal roadmap has us building a standalone version similar to how folks use SmartOS standalone.

[1]: https://www.tritondatacenter.com/smartos

[2]: https://github.com/TritonDataCenter/linux-live

Re: Introduction to Immutable Linux Systems

#140

Earlier quoted context omitted.

> spinning rust Weird phrasing. Haven't seen that before.

If you Google it, it's a pretty common phrase referring to magnetic disk as opposed to SSD. Could even be applied to drum, I suppose, if you could still find any...

Can't be that common since I've never come across it in 20+ years.
Post reply on HN