this post was submitted on 14 Oct 2024
33 points (90.2% liked)
Linux
47946 readers
1888 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I like the idea of rsync as it is simple. I could combine rsync with btrfs to use snapshots are the working system and the current r/w system as the part that gets updated.
However, I think it would be good to use OStree as it has features like the ability to manage boot including auto rollbacks and easy switching between states.
That's the beauty of snapshots, you can boot them. So you just need GRUB to generate the correct menu and you can boot any arbitrary version of your system. On the ZFS side of things there's zfsbootmenu, but I'm pretty sure I've seen it for btrfs too. You don't even need rsync, you can use
ssh $server btrfs send | btrfs recv
and it should in theory be faster too (btrfs knows if you only modified one block of a big file).That kind of goes against the immutable thing. What I'd do is make a script that mounts a fork of the current snapshot readwrite into a temporary directory, chroot into it, install packages, exit chroot, unmount and then commit those changes as a snapshot. That's the closest I can think of that's easy to DIY that's basically what
rpm-ostree install
does. It does it differently (daemon that manages hardlinks), but filesystem snapshots basically do the same thing without the extra work.I found this, maybe it'll help: https://ostreedev.github.io/ostree/adapting-existing/
It looks like the fundamental is the same, temporary directory you run the package manager into and then you commit the changes. So you can probably make it work with Debian if you want to spend the time.