Agama/Leap16.0: example of BTRFS parent volume (@) + subvolume customization

I found a way how to change default BTRFS parent volume (normally hardocded to @) or to create any custom BTRFS subvolume on stock Agama (LEAP 16.0) installer - tested ISO Leap-16.0-online-installer-x86_64-Build171.1.install.iso. The whole trick is in modifying so called “product file” of installer.

In my example resulting BTRFS filesystem has following customization:

  • parent root subvolume is @leap16 (normally always @)
  • there is additional subvolume srv2

How I did that:

  1. normally boot install ISO
  2. once Agama starts - press Ctrl-Alt-F3 to switch to text console
  3. login as root with provided password (printed on console)
  4. edit file /usr/share/agama/products.d/leap_160.yaml (you can use vi editor)
  5. below is diff for my changes:
--- leap_160.yaml.orig  2026-06-05 22:04:31.151841796 +0200
+++ leap_160.yaml       2026-06-05 22:04:31.151841796 +0200
@@ -116,12 +116,13 @@
       btrfs:                                               
         snapshots: true                                    
         read_only: false                                   
-        default_subvolume: "@"                 
+        default_subvolume: "@leap16"                
         subvolumes:                                        
           - path: home                                     
           - path: opt                                      
           - path: root                                     
           - path: srv
+          - path: srv2
           - path: usr/local
           # Unified var subvolume - https://lists.opensuse.org/opensuse-packaging/2017-11/msg00017.html
           - path: var
  1. after save of changes and exit from editor we have to restart Agama service to reload changes with: systemctl restart agama
  2. before switching back - please note generated root password - you will need it
  3. now use Alt-F2 (or Ctrl-Alt-F2) to switch back to Agama installer
  4. it may wait for a while and ask you for root password - use that one noted from other console
  5. now you can proceed with install as usual - if you will use BTRFS filesystem in Storage setup it will apply our changes to its subvolumes layout
  6. Disclaimer: I tested only BTRFS without snapshots (yet).
  7. you can verify that either during installation (when in Software or later stage) - by again pressing Ctrl-Alt-F3 to switch to console and using command btrfs su li /mnt

Below is my BTRFS layout after reboot to installed system:

$ btrfs su li -a /

ID 256 gen 51 top level 5 path <FS_TREE>/@leap16
ID 257 gen 39 top level 256 path @leap16/boot/grub2/x86_64-efi
ID 258 gen 39 top level 256 path @leap16/boot/grub2/i386-pc
ID 259 gen 51 top level 256 path @leap16/var
ID 260 gen 42 top level 256 path @leap16/usr/local
ID 261 gen 39 top level 256 path @leap16/srv2
ID 262 gen 39 top level 256 path @leap16/srv
ID 263 gen 48 top level 256 path @leap16/root
ID 264 gen 39 top level 256 path @leap16/opt
ID 265 gen 44 top level 256 path @leap16/home

Hopefully someone will find that useful - to workaround some Agama limitations in LEAP 16.0

Below is example how to create our own Agama product “MLGA Leap 16.0” which includes Xfce/X11, mc and tmux and creates just single BTRFS subvolume /home under parent volume @leap16.

You have to download that file from https://raw.githubusercontent.com/hpaluch/opensuse-files/refs/heads/master/agama/products.d/mlga_160.yaml and drop it in /usr/share/agama/products.d/

WARNINGs!

  1. Our BTRFS subvolume pattern is incompatible with Snapshots. You have to select BTRFS without snapshots to used this mod.
  2. you have to use Online installer (Offline does not contain Xfce/X11 packages) to use Xfce/X11 pattern

1st screenshot showing new product MLGA:

2nd screenshot showing new pattern “Xfce” (meaning Xfce/X11):

BTRFS subvolume list after install:

$ sudo btrfs su li -a /
ID 256 gen 47 top level 5 path <FS_TREE>/@leap16
ID 257 gen 47 top level 256 path @leap16/home

Hopefully this example will serve as inspiration for others :slight_smile:

Hi
You can set your own root/installer password on the iso image?
https://agama-project.github.io/docs/devel/live_iso#injecting-the-default-password-into-the-iso-image

I use a json file and load a profile of the packages, disk layout, users, boot options etc. Might want to investigate that more? Added bonus, I just boot the system with the USB, then log in from my main computer to do the install…

If you setup manually, then you can export/save the config for later tweaking.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.