Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

btrfs subvolumes during installation

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
jfabernathy
Posts: 47
Joined: 2023-04-10 12:19
Location: Raleigh, NC
Has thanked: 6 times
Been thanked: 4 times

btrfs subvolumes during installation

#1 Post by jfabernathy »

I have noticed that depending which .ISO file you download from the Debian repositories your installation will have different subvolumes on your btrfs root drive.

If you use debian-live-11.7.0-amd64-cinnamon+nonfree.ios you get @ and @home which is required for Timeshift to work.

If you use debian-bookworm-DI-rc4-amd64-netinst.iso you get only one subvolume call @rootfs, which is not compatible with Timeshift.

How can I know before I do an installation what the subvolume layout will be for btrfs installs?

Random_Troll
Posts: 444
Joined: 2023-02-07 13:35
Been thanked: 105 times

Re: btrfs subvolumes during installation

#2 Post by Random_Troll »

Looks like the @rootfs layout has been default since the RC1 installer, it is highly unlikely to be different for today's release. But I might be wrong.

If you use the "expert" installer and drop to a TTY before the package installation stage I think /target/ should show the subvolume(s). Any desired changes could be made at that stage, which would be simpler than changing the subvolume layout after installation.
Jeder nach seinen Fähigkeiten, jedem nach seinen Bedürfnissen.

jfabernathy
Posts: 47
Joined: 2023-04-10 12:19
Location: Raleigh, NC
Has thanked: 6 times
Been thanked: 4 times

Re: btrfs subvolumes during installation

#3 Post by jfabernathy »

Random_Troll wrote: 2023-06-10 11:19 Looks like the @rootfs layout has been default since the RC1 installer, it is highly unlikely to be different for today's release. But I might be wrong.

If you use the "expert" installer and drop to a TTY before the package installation stage I think /target/ should show the subvolume(s). Any desired changes could be made at that stage, which would be simpler than changing the subvolume layout after installation.
1. It sure would be nice to know before you do a Graphic install what you're going to get for subvolumes on BTRFS drives
2. I know the method for getting the correct subvolumes by shelling out.
3. The default @rootfs is complete incompatible with Timeshift

It would really be nice if the release notes documented btrfs subvols for installation.

Random_Troll
Posts: 444
Joined: 2023-02-07 13:35
Been thanked: 105 times

Re: btrfs subvolumes during installation

#4 Post by Random_Troll »

So have you submitted a bug report or feature request about this?

That would be more effective than opening threads here.
Jeder nach seinen Fähigkeiten, jedem nach seinen Bedürfnissen.

jfabernathy
Posts: 47
Joined: 2023-04-10 12:19
Location: Raleigh, NC
Has thanked: 6 times
Been thanked: 4 times

Re: btrfs subvolumes during installation

#5 Post by jfabernathy »

Random_Troll wrote: 2023-06-10 11:53 So have you submitted a bug report or feature request about this?

That would be more effective than opening threads here.
I'll try

Aki
Global Moderator
Global Moderator
Posts: 2816
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 68 times
Been thanked: 382 times

Re: btrfs subvolumes during installation

#6 Post by Aki »

Random_Troll wrote: 2023-06-10 11:19 if you use the "expert" installer and drop to a TTY before the package installation stage I think /target/ should show the subvolume(s). Any desired changes could be made at that stage, which would be simpler than changing the subvolume layout after installation.
This is an example with Debian installer for Bullseye (11.0.0) : https://www.youtube.com/watch?v=bQRWNr3ZNfc

A bug report named "debian-installer: Add btrfs subvolume setting for snapshot" has been already submitted [1] for debian-installer package. The last answer is [2] with a patch proposal [3].

The author of the patch (merged in the debian installer) reports:
[..] I decided to leave configuring @home up to the user, because the user may wish to mount /home using another block device, possibly on a non-btrfs volume. [..]
With the patches [3] related to the aforementioned bug report, the support for @rootfs subvolume has been added to partman-btrfs [4] package (used by debian installer during partitioning with btrfs file system):

Code: Select all

diff --git a/debian/changelog b/debian/changelog
index 9c13946..2c579dc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,22 @@
 partman-btrfs (53) UNRELEASED; urgency=medium
 
   [ Nicholas D Steeves ]
-  * Add minimal subvolume support for /.
+  * Add minimal subvolume support for /.  The btrfs volume designated as the
+    device used for "/" is now configured to use the "@rootfs" subvolume.
+    This subvolume name was chosen as a compromise between the two primary
+    conventions in btrfs default subvolume naming.  Installing the rootfs to
+    a subvolume allows update-grub to correctly generate the
+    "rootflags=subvol=@rootfs" needed to boot from a subvolume, and other
+    subvolumes may be created as needed.  The creation of other commonly used
+    subvolumes such as "@home" has not been hard-coded, because a user may
+    choose to locate /home on another device--possibly even on another file
+    system.  This change unblocks development of btrfs boot environments,
+    which most other major operating systems have supported for quite some
+    time (Closes: #964818).
   * Migrate to debhelper-compat 13.
   * Assert Rules-Requires-Root: no.
 
- -- Nicholas D Steeves <nsteeves@gmail.com>  Mon, 09 Mar 2020 17:26:59 -0400
+ -- Nicholas D Steeves <nsteeves@gmail.com>  Wed, 20 Jan 2021 12:17:33 -0500
---
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840248
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840248#90
[3] https://salsa.debian.org/installer-team/partman-btrfs/-/merge_requests/1
[4] https://packages.debian.org/bullseye/partman-btrfs
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

jfabernathy
Posts: 47
Joined: 2023-04-10 12:19
Location: Raleigh, NC
Has thanked: 6 times
Been thanked: 4 times

Re: btrfs subvolumes during installation

#7 Post by jfabernathy »

Aki wrote: 2023-06-10 13:11
Random_Troll wrote: 2023-06-10 11:19 if you use the "expert" installer and drop to a TTY before the package installation stage I think /target/ should show the subvolume(s). Any desired changes could be made at that stage, which would be simpler than changing the subvolume layout after installation.
This is an example with Debian installer for Bullseye (11.0.0) : https://www.youtube.com/watch?v=bQRWNr3ZNfc
I have seen 3 or 4 videos on installing Debian with btrfs compatible with Timeshift. So I know how to do it. In fact I found a bug in RC1 of Debian 12 and reported it. It seems to be fix in RC4.

The problem is you have to assume all Debian .ISOs will screw up the subvolumes during installation and so you have to start with Expert install for any btrfs system you build.

However, some of the Debian ISO that have a full install including non-free firmware and a Desktop environment will have the @ and @home subvols setup correctly for Timeshift without having to use Expert installation.

I just would like to know ahead of time which ISOs will work that way.

Aki
Global Moderator
Global Moderator
Posts: 2816
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 68 times
Been thanked: 382 times

Re: btrfs subvolumes during installation

#8 Post by Aki »

jfabernathy wrote: 2023-06-10 13:27 [..]
However, some of the Debian ISO that have a full install including non-free firmware and a Desktop environment will have the @ and @home subvols setup correctly for Timeshift without having to use Expert installation. I just would like to know ahead of time which ISOs will work that way.
Yes, it would be interesting to investigate it. According to the latest partman-btrfs changelog [1], it seems it should not be supported the creation of a @home subvolume (EDIT: by the debian installer).

---
[1] https://metadata.ftp-master.debian.org/changelogs//main/p/partman-btrfs/partman-btrfs_54_changelog
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

jfabernathy
Posts: 47
Joined: 2023-04-10 12:19
Location: Raleigh, NC
Has thanked: 6 times
Been thanked: 4 times

Re: btrfs subvolumes during installation

#9 Post by jfabernathy »

So it appears the powers that be did think about it and decided against making it compatible with Timeshift by default. I have found no technical reason that jumping through the hoops and using the shell escape method the youtubers use will not work or is even remotely a problem causer.

I could always just create my snapshots manually of @rootfs, but that means I can't use a proven package like Timeshift. Snapper might work on Debian. I have not done much testing of that. Snapper is the way to go on Arch based distos. The mods to the overlayFS allow booting the read-only snapper snapshots when your current system is not bootable but grub still works.

Aki
Global Moderator
Global Moderator
Posts: 2816
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 68 times
Been thanked: 382 times

Re: btrfs subvolumes during installation

#10 Post by Aki »

jfabernathy wrote: 2023-06-10 14:01 So it appears the powers that be did think about it and decided against making it compatible with Timeshift by default.
I'm not a timeshift user, but I read in its documentation that it can be used in rsync or btrfs mode. Therefore, it should work in rsync mode with Debian, if the user does not prepare the btrfs subvolumes by himself/herself.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

jfabernathy
Posts: 47
Joined: 2023-04-10 12:19
Location: Raleigh, NC
Has thanked: 6 times
Been thanked: 4 times

Re: btrfs subvolumes during installation

#11 Post by jfabernathy »

Aki wrote: 2023-06-10 14:40
jfabernathy wrote: 2023-06-10 14:01 So it appears the powers that be did think about it and decided against making it compatible with Timeshift by default.
I'm not a timeshift user, but I read in its documentation that it can be used in rsync or btrfs mode. Therefore, it should work in rsync mode with Debian, if the user does not prepare the btrfs subvolumes by himself/herself.
That maybe true but btrfs snapshots are instantaneous and rsync takes half a lifetime.

Aki
Global Moderator
Global Moderator
Posts: 2816
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 68 times
Been thanked: 382 times

Re: btrfs subvolumes during installation

#12 Post by Aki »

jfabernathy wrote: 2023-06-10 14:54 That maybe true but btrfs snapshots are instantaneous and rsync takes half a lifetime.
You can propose a patch to modify the partman-btrfs package, of course.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Danathar
Posts: 28
Joined: 2021-01-10 12:44
Been thanked: 1 time

Re: btrfs subvolumes during installation

#13 Post by Danathar »

jfabernathy wrote: 2023-06-10 13:27
Aki wrote: 2023-06-10 13:11
Random_Troll wrote: 2023-06-10 11:19 if you use the "expert" installer and drop to a TTY before the package installation stage I think /target/ should show the subvolume(s). Any desired changes could be made at that stage, which would be simpler than changing the subvolume layout after installation.
This is an example with Debian installer for Bullseye (11.0.0) : https://www.youtube.com/watch?v=bQRWNr3ZNfc
I have seen 3 or 4 videos on installing Debian with btrfs compatible with Timeshift. So I know how to do it. In fact I found a bug in RC1 of Debian 12 and reported it. It seems to be fix in RC4.

The problem is you have to assume all Debian .ISOs will screw up the subvolumes during installation and so you have to start with Expert install for any btrfs system you build.

However, some of the Debian ISO that have a full install including non-free firmware and a Desktop environment will have the @ and @home subvols setup correctly for Timeshift without having to use Expert installation.

I just would like to know ahead of time which ISOs will work that way.
Which of the videos did you watch were the best? I've started down this rocky road as well.

Are you saying that some of the Debian ISOs created for Bookworm ARE creating the @ and @home subvols? Which ones did that?

I hope somehow all this gets resolved. IDK who should be fixing it, it's kinda hard to figure out from the discussion threads. Bottom line though, as long as either timeshift or BTRFS volumes are not setup right during a basic install, only the most determined are going to use timeshift with BTRFS which is a shame.

jfabernathy
Posts: 47
Joined: 2023-04-10 12:19
Location: Raleigh, NC
Has thanked: 6 times
Been thanked: 4 times

Re: btrfs subvolumes during installation

#14 Post by jfabernathy »


User avatar
RZG01
Posts: 17
Joined: 2023-05-15 19:34

Re: btrfs subvolumes during installation

#15 Post by RZG01 »

Hello World.
Please, help-me here:
viewtopic.php?t=155082

Post Reply