You are viewing a single thread.
View all comments
19 points

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.

permalink
report
reply
14 points

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.

permalink
report
parent
reply
3 points

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

permalink
report
parent
reply
10 points
*

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.

permalink
report
parent
reply
5 points

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.

permalink
report
parent
reply
7 points
*

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.

permalink
report
parent
reply
5 points

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

permalink
report
parent
reply
1 point

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.

permalink
report
parent
reply
0 points
*

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.”

permalink
report
parent
reply
2 points

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.

permalink
report
parent
reply
6 points

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

permalink
report
parent
reply
1 point

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.

permalink
report
parent
reply
1 point

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

permalink
report
parent
reply
1 point

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

permalink
report
parent
reply
4 points

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.

permalink
report
parent
reply
2 points

You can downgrade packages on arch too via downgrade.

permalink
report
parent
reply
3 points
*

If your pc still boots.

permalink
report
parent
reply
1 point
*

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.

permalink
report
parent
reply

linuxmemes

!linuxmemes@lemmy.world

Create post

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!

Community stats

  • 6.8K

    Monthly active users

  • 1.3K

    Posts

  • 71K

    Comments