this post was submitted on 20 Jun 2023
33 points (100.0% liked)

Linux

1259 readers
61 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

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I've heard of immutable OS's like Fedora Silverblue. As far as I understand it, this means that "system files" are read-only, and that this is more secure.

What I struggle to understand is, what does that mean in practical terms? How does installing packages or configuring software work, if system files can't be changed?

Another thing I don't really understand is what the benefits as an end user? What kinds of things can I do (or can be done by malware or someone else) to my Arch system that couldn't be done on an immutable system? I get that there's a security benefit just in that malware can't change system files -- but that is achieved by proper permission management on traditional systems too.

And I understand the benefit of something declarative like NixOS or Guix, which are also immutable. But a lot of OS's seem to be immutable but not purely declarative. I'm struggling to understand why that's useful.

top 16 comments
sorted by: hot top controversial new old
[–] mustbe3to20signs@feddit.de 13 points 1 year ago (1 children)

An immutable distro, to my understanding, locks core components of Linux (mainly /sys afaik) from interaction from not only bad actors but also the user so that you can't fuck up you're system in a way like Linus from LTT (removing X11 by forcefully ignoring all warnings). Applications can be installed as Flatpak, AppImage, Snap or through OverlayFS from regular repositories.

Advantages to (non- tech savvy) users are an additional layer against their own mistakes and easier support since the important stuff is identical on every install of the given distro.

[–] sudotstar@kbin.social 7 points 1 year ago

This is, IMO, the biggest yet least obvious advantage of immutable systems. A traditional Linux environment is "just as safe" as the immutable setups, if only the user/administrator is perfect, never makes a mistake, and always makes the right decisions for now and the future.

Given reality tends to differ from the above, having a system that, at a bare minimum, provides you the "oh shit go back" button to system-level changes, and at best provides a clear, reproducible, trail of actions, is a huge advantage for long-term stability for all users, experienced or not. I've been through the school of hard knocks far too many times maintaining everything from server setups to gaming desktops the traditional way, and have committed to "early adopting" immutable distros for pretty much everything except the gaming setup (given the whole suite of proprietary and out-of-date/out-of-touch applications that are basically necessary in that space and not-fully-compatible with the sandboxes and abstraction layers necessary).

[–] tikitaki@kbin.social 5 points 1 year ago (1 children)

applications are installed with flatpak - basically little containers that contain everything a program needs. sort of like docker

so normally if you wanna install something - let's say minecraft. you would also need to install java. the flatpak for minecraft would have java inside of it so it can be run in its own little container and you don't need to install either

[–] IncidentalIncidence@feddit.de 1 points 1 year ago (1 children)

I guess what I am trying to figure out is -- how would the experience of using flatpak or other containerized software managers differ on an immutable system compared to a mutable one?

Or is the idea more that since you're containerizing, you can lock everything else for stability in a way that you couldn't before, because software installs needed to be installed in the system?

[–] moon_matter@kbin.social 2 points 1 year ago* (last edited 1 year ago)

Or is the idea more that since you're containerizing, you can lock everything else for stability in a way that you couldn't before, because software installs needed to be installed in the system?

It's this one. For example, with Silverblue, applications are all installed as flatpaks. The system level files are also made as read-only as possible, such that the base systems should look virtually identical across systems. You also get some like NixOS where most of the system setup is defined in a single config file. You can effectively copy your entire setup just by transplanting that one file on to a new system.

[–] monkeysuncle 4 points 1 year ago (1 children)

The most basic benefit of immutable OSes like Fedora Silverblue is that you are prevented from messing up your system enough that you are unable to boot into it and fix it. This isn't strictly true, you can always go out of your way to screw things up (say deleting required partitions), but in normal usage you will always have a backup to boot and fix whatever you messed up. It also makes it extremely easy to undo things even if they aren't errors.

It's possible to do this without immutable OSes using btrfs snapshots before you change anything system-wide, in fact I believe MicroOS uses btrfs snapshots for their immutable system, but that adds cognitive load as it requires you to remember to create a snapshot. OpenSUSE Tumbleweed provides snapshotting automatically and adds entries to the bootloader for previous iterations, but it isn't immutable because you can still go and modify your root partition without taking a snapshot. MicroOS, however, has a read-only root partition so it becomes a lot more difficult to make a change without a snapshot. You can still do it, but you have to go out of your way to do it.

[–] Trainzkid@lemmy.ml 1 points 1 year ago

Adding to this, Snapper (snapshotting utility for btrfs) has a way to enable snapshots after each install of an app, and I'm pretty sure there's a package somewhere that adds btrfs snapshots to grub entries, so you could theoretically boot back into a stable version of your system pretty easily

[–] DrNeurohax@kbin.social 3 points 1 year ago (2 children)

I'm generally a Windows user, but on the verge of doing a trial run of Fedora Silverblue (just need to find the time). It sounds like a great solution to my.. complicated... history with Linux.

I've installed Linux dozens of times going back to the 90s (LinuxPPC anyone? Yellow Dog?), and I keep going back to Windows because I tweak everything until it breaks. Then I have no idea how I got to that point, but no time to troubleshoot. Easily being able to get back to a stable system that isn't a fresh install sounds great.

[–] tikitaki@kbin.social 3 points 1 year ago (1 children)

I've been using the same distro for at least 4 years now and I haven't ever had any issues. Fedora on a desktop at home. It's very stable. You don't even need to know too much... although obviously knowing your way around the terminal and knowing some basic things about Linux helps

You don't understand what it's like for people who love to fiddle with settings and options without knowing what they do

[–] kernelPanic@lemmy.ml 1 points 1 year ago

You can also check btrfs and snapper

[–] fr0g@kbin.social 2 points 1 year ago (2 children)

How does installing packages or configuring software work, if system files can't be changed?

On reboot. You install your changes into a separate part of the filesystem that's not running and then "switch parts" on next boot. Different distros do this differently. Vanilla OS has an AB system which basically works like Android does it, openSUSE uses btrfs snapshots and Fedora also uses btrfs I think but they got a more complex layering system on top.

I get that there's a security benefit just in that malware can't change system files -- but that is achieved by proper permission management on traditional systems too.

Is it though? All it takes is a misconfiguration or exploit to bypass it, so having several layers of protection isn't a bad thing and how any reasonably secure system works. And having parts of your system predetermined as read only is a comparably tough nut to crack.

[–] IncidentalIncidence@feddit.de 2 points 1 year ago (1 children)

yeah that's true, even properly permissioned users can break their systems

[–] zalack@kbin.social 3 points 1 year ago* (last edited 1 year ago)

especially properly permissioned users, even.

[–] jalda@sopuli.xyz 1 points 1 year ago (1 children)

On reboot.

Not necessarily. NixOS has the option to change generations without rebooting.

[–] SchizoRamblings@vlemmy.net 2 points 1 year ago

so does silverblue

load more comments
view more: next ›