From 494347a931f37acac22ffff171b719bf0423d687 Mon Sep 17 00:00:00 2001 From: anaximeno Date: Tue, 21 Oct 2025 14:25:20 -0100 Subject: [PATCH] btrfs: Improve fstab mount options during a btrfs install --- usr/lib/live-installer/installer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/lib/live-installer/installer.py b/usr/lib/live-installer/installer.py index db03c8a8..040c4de2 100644 --- a/usr/lib/live-installer/installer.py +++ b/usr/lib/live-installer/installer.py @@ -592,9 +592,9 @@ def write_fstab(self, path="/target/etc/fstab"): if "ext" in fs: fstab_mount_options = "rw,errors=remount-ro" elif fs == "btrfs" and partition.mount_as == "/": - fstab_mount_options = "defaults,subvol=@" + fstab_mount_options = "subvol=@,defaults,noatime,compress=zstd:1,discard=async" elif fs == "btrfs" and partition.mount_as == "/home": - fstab_mount_options = "defaults,subvol=@home" + fstab_mount_options = "subvol=@home,defaults,noatime,compress=zstd:1,discard=async" else: fstab_mount_options = "defaults" @@ -606,7 +606,7 @@ def write_fstab(self, path="/target/etc/fstab"): if fs == "btrfs" and partition.mount_as == "/" and not self.setup_has_dedicated_home(): # Special case, if / is btrfs and there is no dedicated /home, add the @home subvolume to / - fstab.write("%s\t%s\t%s\t%s\t%s\t%s\n" % (partition_uuid, "/home", "btrfs", "defaults,subvol=@home", "0", "0")) + fstab.write("%s\t%s\t%s\t%s\t%s\t%s\n" % (partition_uuid, "/home", "btrfs", "subvol=@home,defaults,noatime,compress=zstd:1,discard=async", "0", "0")) fstab.close() def write_mtab(self, fstab="/target/etc/fstab", mtab="/target/etc/mtab"):