Skip to content

btrfs: Improve fstab mount options during a btrfs install#172

Open
anaximeno wants to merge 2 commits into
linuxmint:masterfrom
anaximeno:improve-btrfs-install-fstab-mount-options
Open

btrfs: Improve fstab mount options during a btrfs install#172
anaximeno wants to merge 2 commits into
linuxmint:masterfrom
anaximeno:improve-btrfs-install-fstab-mount-options

Conversation

@anaximeno
Copy link
Copy Markdown

@anaximeno anaximeno commented Oct 21, 2025

I've improved the btrfs install to use compression by default (which reduces writes and uses less storage) and some other options that should be better for modern SSDs.

Used as a reference the fstab mounts in distros such as Fedora and CachyOS which use similar mount options for btrfs, and this reference on BTRFS mount options I found: https://wiki.tnonline.net/w/Btrfs/Mount_Options

Tested the installation with both a single root partition on btrfs and split root and home partion when both on btrfs and it worked well in both cases.

Comment thread usr/lib/live-installer/installer.py Outdated
No need to explicitly set discard=async in fstab, as it is the default for kernel versions ≥ 6.2 and is automatically enabled on SSD/NVMe devices. ref: https://btrfs.readthedocs.io/en/latest/ch-mount-options.html

Thanks https://github.com/emanuc for the suggestion.
@Fantu
Copy link
Copy Markdown

Fantu commented Jun 5, 2026

Thanks for this, it would be helpful to add more predefined subvolumes and make it possible to choose whether to have compression and which one.
Can you tell me how to generate an ISO with a modified installer to test some changes? Or maybe I should boot an existing live iso and install the modified package inside? there isn't mint 23 alpha iso available or generable at the moment or I'm wrong?

@anaximeno
Copy link
Copy Markdown
Author

Thanks for this, it would be helpful to add more predefined subvolumes and make it possible to choose whether to have compression and which one.

This PR is relatively narrow and focuses more on extending the existing support for manually set (home and root) btrfs partitions with these flags. I know a more extensive pull request with more extensive (and first class) btrfs install support was made by another user in this repo some time ago, but wasn't accepted however.

Can you tell me how to generate an ISO with a modified installer to test some changes? Or maybe I should boot an existing live iso and install the modified package inside? there isn't mint 23 alpha iso available or generable at the moment or I'm wrong?

I tested it from the LMDE 7 ISO, it uses this installer. You can just apply these changes there, or clone this branch I sent for this PR and run it with ./test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants