sector-f-linux

Sector F Linux
git clone https://git.sectorflabs.com/sector-f-linux.git
Log | Files | Refs | README | LICENSE

0001-bootc-image-with-zfs-for-data.md (2174B)


      1 # 0001. An Ubuntu bootc image for the system, ZFS for the data
      2 
      3 Date: 2026-10-15
      4 
      5 ## Status
      6 
      7 Superseded by [ADR-0009](0009-seflos-a-fedora-bootc-image-on-btrfs.md): a bootc image for the system is back, on Fedora and Btrfs, with no ZFS.
      8 
      9 Before that: Superseded by ADR-0006 (bootc ruled out) and ADR-0007 (Ubuntu updated with apt on a ZFS root).
     10 
     11 ## Context
     12 
     13 The Patina desktop runs as the whole session on nifl, an Ubuntu laptop, installed by hand with
     14 `make install`. We want machines that run a known-good build of the system and the desktop
     15 together, update atomically and roll back, and we want ZFS (snapshots, send/receive,
     16 compression, encryption) for the data that matters.
     17 
     18 bootc builds the whole OS as an OCI image and deploys it through ostree/composefs: a read-only
     19 `/usr`, `/etc` merged across updates, `/var` kept, the next image staged for the next boot and
     20 the last one kept to roll back to. Its supported bases are Fedora, CentOS Stream and RHEL; Ubuntu
     21 bases exist from the community, not Canonical.
     22 
     23 ZFS can't ship with Fedora (its licence), and Fedora's kernels often run ahead of what OpenZFS
     24 supports. Ubuntu builds the ZFS module for each of its kernels.
     25 
     26 Three ways were weighed:
     27 
     28 1. bootc on ext4/xfs for the system, ZFS for the data.
     29 2. Ubuntu on a ZFS root with boot environments (ZFSBootMenu), as FreeBSD does with `bectl`.
     30 3. bootc on a ZFS root.
     31 
     32 ## Decision
     33 
     34 Option 1: an Ubuntu bootc image for the system on ext4 or xfs, and a ZFS pool for `/home` and
     35 other data. The image is built from a Containerfile with the Patina desktop in it.
     36 
     37 ## Consequences
     38 
     39 - The system is atomic and can be rolled back; the data has ZFS's snapshots, separately, so
     40   rolling the system back never touches it.
     41 - Packages go into the image, not onto the running system with apt.
     42 - We depend on a community Ubuntu bootc base until Canonical packages bootc, and inherit its
     43   rough edges (the kernel, the initramfs with dracut instead of initramfs-tools, the
     44   bootloader). See docs/notes.md.
     45 - Importing the ZFS pool at boot (and unlocking it, if encrypted) is ours to set up in the image.
     46 - Option 2 stays the fallback if the bootc bases for Ubuntu don't hold up.