this post was submitted on 06 Mar 2025
7 points (81.8% liked)

Linux

51161 readers
1412 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
 

Hello folks!

So I have installed gentoo a few times before so I am not completely new to it. But I am new to managing things like btrfs and or LVM manually.

So my plan is to install Gentoo with btrfs and snapper so that you can boot in to read only snapshots from grub and rollback once booted. This is what Opensuse Tumbleweed does.

I would like to know which btrfs layout and or LVM layout is required for such a setup. I have been able to find some info that I think requires the /boot subvolume to be on the root of the system. Also some say you need to make the .snapshot volume some say you dont and snapper does this. So their is a fair bit of conflicted info about it to get working right.

top 10 comments
sorted by: hot top controversial new old
[–] ashaman2007@lemm.ee 4 points 2 days ago

If you set up the system like openSUSE then it makes sense snapper would work. I'd look at the openSUSE docs, its not like btrfs is different in Gentoo right? https://en.opensuse.org/SDB:BTRFS#Default_Subvolumes

[–] a14o@feddit.org 1 points 2 days ago

Snapper assumes that your system is "formatted with btrfs or some other snapper compatible filesystem". I'm pretty sure that this means that that your root directory is mounted from a btrfs subvolume.

So all you need to do is setup btrfs at install time and then configure Snapper. You should consider mounting /home from its own subvolume. That way you can roll back the system but keep all your files.

There are a lot of other things to consider when setting up btrfs, so make sure you read the docs. (A lot of the config can changed at a later point.)

[–] just_another_person@lemmy.world -2 points 2 days ago (1 children)

Can you explain what your end goal and use-case is? I'm confused on why you want both as they are both capable of each doing each other's jobs in different ways.

[–] kylian0087@lemmy.dbzer0.com 1 points 2 days ago* (last edited 2 days ago) (1 children)

What do you mean with both?

[–] just_another_person@lemmy.world -2 points 2 days ago* (last edited 2 days ago) (1 children)

Well BTRFS can go back to PiT snapshots and run from there, and snapper is an abstraction for BTRFS...so what's your goal?

[–] kylian0087@lemmy.dbzer0.com 2 points 2 days ago (1 children)

Like I said in the post. To set it up just like Opensuse Tumbleweed. I find snapper quite easy to work with and use to rollback from those bootable snapshots. Also it making snapshots after updates is quite useful too

[–] just_another_person@lemmy.world 0 points 2 days ago (1 children)

Well if it's just a preference thing, there is a Gentoo guide for using it: https://wiki.gentoo.org/wiki/Snapper

It describes the locations of what needs access to what in Gentoo to work properly.

[–] kylian0087@lemmy.dbzer0.com -1 points 2 days ago (2 children)

I have read that page and this isnt really what i asked. this is about just snapper not how to setup btrfs to get it working as i explained above

[–] Giloron@programming.dev 2 points 2 days ago

I'm not familiar with what Suse is doing, but that doc seems to imply that there is a fundamental difference in the configuration between Gentoo and Suse.

I wonder if there is something in the Suse docs that describes how they get a rollback option into the grub menu.

I agree that the Gentoo wiki pages around btrfs and snapper seem a bit lacking.

[–] just_another_person@lemmy.world -1 points 2 days ago

Well the Gentoo community felt it was good enough and made the effort to write that doc for you. Unsure what you've asked here.

This seems like one of those questions where the source of truth is telling you it's not going to happen, but you want a world in which it exists and for help in making that happen.

Maybe dig in and learn about snapshots and partitioning.