Installing Fedora KDE to btrfs subvolumes at a custom location

Hello, I am trying to install Fedora KDE (using the Fedora Everything installer because I need to roll my own bootloader setup for verified boot reasons). I have created the desired partition layout manually and I was then able to configure the mountpoints within the installer using Blivet-GUI. However, the installer runs into some assumption that I do not fully understand. Here’s what I did in the “Installation Destination” section:

  1. Full disk summary and bootloader… > Do not install boot loader
  2. Storage Configuration: Advanced Custom (Blivet-GUI)
  3. Done
  4. set the ESP mountpoint to /efi
  5. open the LUKS container
  6. set the fedora/{root,home} subvolumes to mount at / and /home respectively
  7. click Done and observe the error message

Error checking storage configuration. Click for details or press Done again to continue.

You must create a new file system on the root device.

How do I convince the installer to use these subvolume locations? The subvolumes are empty and were created at mkfs time:

mkdir -p /tmp/whole/fedora/{root,home}/
mkfs.btrfs --rootdir=/tmp/whole --subvol=fedora/{root,home} /dev/mapper/luks

It won’t. You need to remove the root subvolume in blivet and create a new one so Anaconda knows it is empty.

As said already, Fedora KDE on Btrfs subvolumes at custom locations, use the Advanced Custom (Blivet-GUI) partitioning option in the Anaconda installer, as the standard Custom partitioning menu does not support creating Btrfs subvolumes directly.

My method follows this set-up:

Installation Steps

Select Advanced Partitioning: In the installation destination screen, select your drive and choose Advanced Custom (Blivet-GUI) to access the interface capable of managing Btrfs subvolumes.

Create Btrfs Volume:

Ensure the partition scheme is set to Btrfs. Create a single partition for the root filesystem (e.g., /dev/sda2) and select it.

Create Subvolumes:

Select the Btrfs volume and click the + button to create the root subvolume.
Name it root (or @ for Timeshift compatibility) and set the Mount point to /.
Click + again to create the home subvolume.

Name it home (or @home for Timeshift) and set the Mount point to /home.

Configure Boot: Create an EFI System Partition (FAT32) and mount it at /boot/efi. Do not format an existing EFI partition if it is already present.

Finalize: Ensure no separate /boot partition is created unless you specifically intend to store kernels outside the Btrfs root to avoid rollback mismatches. Complete the installation.

Post-Installation Configuration
After installation, you may need to manually configure additional subvolumes for Snapper snapshots or specific directories like /var/log and /opt.

Compression: Enable zstd compression by adding compress=zstd:1 to the mount options in /etc/fstab for each subvolume.

Snapper: Install the snapper and snapper-gui packages. Create a configuration for the root subvolume to enable system snapshots and rollbacks.

GRUB: If using a custom subvolume layout for rollback, you may need to modify GRUB configuration to point kernel images to the correct snapshot subvolume paths.
Good Luck :slight_smile:

─────┬────────────────────────────────────────────────────────────────────────────────────────────────────────
     │ File: /etc/fstab
─────┼────────────────────────────────────────────────────────────────────────────────────────────────────────
   1 │ # /etc/fstab: static file system information.
   2 │ #
   3 │ # Use 'blkid' to print the universally unique identifier for a device; this may
   4 │ # be used with UUID= as a more robust way to name devices that works even if
   5 │ # disks are added and removed. See fstab(5).
   6 │ #
   7 │ # <file system>             <mount point>  <type>  <options>  <dump>  <pass>
   8 │ UUID=5D35-D328                            /boot/efi      vfat    defaults,umask=0077 0 2
   9 │ UUID=93c18f44-5166-477e-85b4-89a04f4f14c7 /              btrfs   subvol=/@,defaults,noatime,compress=zs
     │ td 0 0
  10 │ UUID=93c18f44-5166-477e-85b4-89a04f4f14c7 /.snapshots    btrfs   subvol=/@.snapshots,defaults,noatime,c
     │ ompress=zstd 0 0
  11 │ UUID=93c18f44-5166-477e-85b4-89a04f4f14c7 /home          btrfs   subvol=/@home,defaults,noatime,compres
     │ s=zstd 0 0
  12 │ UUID=93c18f44-5166-477e-85b4-89a04f4f14c7 /root          btrfs   subvol=/@root,defaults,noatime,compres
     │ s=zstd 0 0
  13 │ UUID=93c18f44-5166-477e-85b4-89a04f4f14c7 /var/log       btrfs   subvol=/@var@log,defaults,noatime,comp
     │ ress=zstd 0 0
  14 │ UUID=93c18f44-5166-477e-85b4-89a04f4f14c7 /swap          btrfs   subvol=/@swap,defaults,noatime 0 0
  15 │ /swap/swapfile                            swap           swap    defaults   0 0
  16 │ tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
─────┴────────────────────────────────────────────────────────────────────────────────────────────────────────
┌───────────────────>
│~ 
└─> 

Ah, thanks! Doing everything the same way but then using Blivet instead of flags to mkfs.btrfs to create those fedora/{root,home} subvolumes seems to have done the trick. Awesome!

I have some follow-up questions:

  • Is there any way to set with Blivet-GUI what device mapper name a LUKS container will get? (Or is tweaking /etc/crypttab after the installation the only way?)
  • Instead of recognizing an already-open LUKS devices, Blivet-GUI fails to open them and suggests that perhaps the password was incorrect. To make this more intuitive, it would have to be fixed upstream, and not in Anaconda, right?

Turns out the installation process errors out after all. The fix was to create that one directory manually, and then Anaconda correctly creates the requested subvolumes inside there.

Also, here’s one other follow-up question: Is there any way to set custom mount options within the installer?

For BTRFS users, while the installer allows creating subvolumes, specific mount parameters like compression algorithms must be added to /etc/fstab post-install.

If you need to preserve custom mount points from a previous installation, you can view them in the installer under “Mount point assignment” or the Blivet-GUI storage editor, but you still cannot modify their mount options during the setup process.

This has been a bit of of a paper cut for me as well.