this post was submitted on 11 Nov 2023
856 points (85.2% liked)

linuxmemes

21311 readers
645 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 1 year ago
    MODERATORS
     
    you are viewing a single comment's thread
    view the rest of the comments
    [–] netwren@lemmy.world 19 points 1 year ago (6 children)

    Honestly this is the reason I want an immutable build of Arch like NixOS.

    Let me roll back my mistakes and I could live more happily with rolling release.

    [–] seaQueue@lemmy.world 14 points 1 year ago (1 children)

    When I started using Arch I just set it up on a btrfs filesystem and wrote a simple btrbk hook to take a snapshot before any package updates. That made it trivial to unfuck anything that broke after an update. I can't remember the last time I had to roll the system back but it's nice for peace of mind.

    [–] CarlosCheddar@lemmy.world 3 points 1 year ago (2 children)

    That’s quite clever, are there any guides for getting that set up? I’m using btrfs but haven’t gotten into snapshotting yet.

    [–] seaQueue@lemmy.world 10 points 1 year ago* (last edited 1 year ago)

    Start by playing with subvolumes and snapshots so you can get a feel for how they work. Once you've got that down you can break down your root filesystem into sensible subvolume chunks (/, /home, /var/log, /var/cache etc) so that you only snapshot relevant content during each update. I wrote a btrbk config at that point, tested it a few times and then wrote a pacman hook to fire it on install, update or package remove events and went from there.

    Here's what I use to take snapshots - you'll need to write an appropriate btrbk config file for your subvolume layout but it's otherwise feature complete. https://gitlab.com/arglebargle-arch/btrbk-autosnap

    Like I mentioned above, I haven't actually needed to roll the system back in ages but I get a lot of mileage out of being able to reach back in time and grab old versions of files for comparison.

    Time shift is a lot easier if you're just starting out but it also requires a specific subvolume structure and isn't very flexible.

    Edit: pro tip: don't make /var a separate subvolume from /, it's way, way, way too easy to roll one or the other (/ or /var) back without the other. If you do that by accident pacman's state becomes out of sync with the running system and everything breaks. Stick to splitting frequently rewritten data like /var/cache and /var/log off, leave /var itself in the root subvolume.

    [–] penquin@lemmy.kde.social 5 points 1 year ago

    Timeshift, Timeshift auto-snap, and btrfs in the grub menu to have your snapshots there, too. Auto-snap takes a snapshot automatically whenever you upgrade or install some packages.

    [–] PainInTheAES@lemmy.world 7 points 1 year ago* (last edited 1 year ago) (2 children)

    I feel like I keep posting this everywhere but there's a project called AstOS that attempts this. Also someone clued me in on this distro neutral solution. AshOS. Full disclosure I haven't used either.

    [–] netwren@lemmy.world 5 points 1 year ago (1 children)

    I'm looking to reload my daily driver and there's just not enough support for that.

    [–] PainInTheAES@lemmy.world 1 points 1 year ago

    Oh totally fair, it doesn't have a huge maintainer base for sure. But it'll never be anyone's daily driver if no one knows about it.

    [–] takeda@lemmy.world 0 points 1 year ago* (last edited 1 year ago) (1 children)

    It looks like solutions like these miss the whole point of what Nix is trying to do. Nix comes with the belief: "Unix has some fundamental issues, because it was designed in specific way. If we store things differently it works really well, and we even get those cool properties for free".

    The authors of those projects instead of thinking "this looks interesting, and it is a paradigm shift but it might be worth to to try feel like Linux noob for some time and start thinking a bit differently how the file system is structured to see if this change is really worth it"

    Instead it is: "I don't need to be PhD in Computer Science (whatever that means), here is how I can force this Nix feature or two on traditional Linux, with ansible, bubble gum and some duct tape and make it immutable-ish, which fails sometimes but, hey, it has the same feature on paper."

    [–] PainInTheAES@lemmy.world 2 points 1 year ago

    Well to be fair I think it's because they aren't trying to be NixOS. You could leverage those arguments against any distro that's trying out an immutable flavor. Which is mostly accomplished through btrfs features.

    I agree that Nix/NixOS does a lot more and it's a genuinely impressive and paradigm shifting project but it does break with traditional Linux layouts and thinking in a way that immutability doesn't necessarily have to do.

    You could also make the same argument with the systemd and non-systemd crowd.

    Either way I look forward to the future of both immutability projects and NixOS. I feel like both areas still need a bit of work but they're both really exciting fields.

    [–] Klaymore@sh.itjust.works 6 points 1 year ago (1 children)

    You mean like nixos-unstable, the rolling release channel of NixOS?

    [–] netwren@lemmy.world 1 points 1 year ago (2 children)

    Well yeah obviously like NixOS. My reason for not using it is that they use a non standard Linux filesystem and it renders a # of packages I want to install incompatible.

    [–] russjr08@outpost.zeuslink.net 1 points 1 year ago (1 children)

    In that case, couldn't you just use something like btrfs snapshots + Timeshift to pull this off?

    [–] netwren@lemmy.world 1 points 1 year ago

    Yeah you could put some together I think, possibly with OverlayFS as well.

    I feel like the value those distros add is not just the rolling mechanism but the package manager being tied into it.

    So you just use the package manager like any other and it works.

    [–] iopq@lemmy.world 1 points 1 year ago

    Which packages?

    1. Check nixpkgs unstable, they might have been added in the last few months before stable release
    2. Try steam-run, it will run binaries like you're in a normal distro

    I ended up packaging the thing myself, actually. The best part is my pull request was approved and I was able to contribute my work

    [–] takeda@lemmy.world 4 points 1 year ago

    I love it, because you can also get best out of both worlds in relation to the comic discusses. You can personalize OS to your liking, and the entire configuration is in a file, so you can redeploy the same setup again.

    [–] Shatur@lemmy.ml 2 points 1 year ago (1 children)

    You can downgrade packages on arch too via downgrade.

    [–] Schmeckinger@feddit.de 3 points 1 year ago* (last edited 1 year ago) (1 children)
    [–] Shatur@lemmy.ml 1 points 1 year ago* (last edited 1 year ago)

    Just add rescue to kernel options (if you use GRUB, press e to edit it for the current boot) and it will boot into console from which you can do downgrade.