Files
fruix/docs/reports/phase7-rootfs-freebsd.md

2.9 KiB

Phase 7.3: Installable FreeBSD rootfs tree materialized from the Fruix system closure

Date: 2026-04-01

Summary

This step takes the Phase 7.2 system closure and materializes a root filesystem tree suitable for later image-construction work.

Added files:

  • tests/system/materialize-phase7-rootfs.scm
  • tests/system/run-phase7-rootfs.sh

Validation command

Run command:

METADATA_OUT=/tmp/phase7-rootfs-metadata.txt \
./tests/system/run-phase7-rootfs.sh

What the harness does

The harness:

  1. ensures the local Guile/Fibers/Shepherd runtime is available
  2. reuses the declarative Phase 7 operating-system model
  3. materializes the referenced system closure under /frx/store
  4. creates a root filesystem tree that points at that closure through:
    • /run/current-system
    • boot symlinks
    • /bin, /sbin, /lib, and /usr/* links into the system profile
    • generated /etc links into the system closure
    • generated Shepherd rc.d launch integration
  5. performs static validation of the generated rootfs structure

Observed results

Observed metadata included:

  • rootfs=/tmp/.../rootfs
  • closure_path=/frx/store/...-fruix-system-fruix-freebsd
  • run_current_system_target=/frx/store/...-fruix-system-fruix-freebsd
  • activate_target=/run/current-system/activate
  • bin_target=/run/current-system/profile/bin
  • sbin_target=/run/current-system/profile/sbin
  • boot_kernel_target=/run/current-system/boot/kernel
  • boot_loader_target=/run/current-system/boot/loader
  • boot_loader_efi_target=/run/current-system/boot/loader.efi
  • rc_conf_target=/run/current-system/etc/rc.conf
  • rc_script_target=/run/current-system/usr/local/etc/rc.d/fruix-shepherd
  • ready_marker=/var/lib/fruix/ready
  • validation_mode=static-rootfs-check
  • ready_state_mode=freebsd-init+rc.d-shepherd

Important findings

  • the current FreeBSD Fruix track now has a concrete rootfs tree derived from the declarative system model and closure rather than only a closure directory in the store
  • the rootfs uses a Guix-like /run/current-system anchor so that generated configuration and system profile content remain tied back to the declarative closure
  • static validation confirmed:
    • boot asset linkage
    • generated /etc linkage
    • activation payload presence
    • Shepherd launch integration
    • declared filesystem content
    • declared user/group provisioning in the activation path
    • the deterministic ready-marker path for the first boot target
  • the chosen ready state for the first integrated FreeBSD system remains:
    • FreeBSD init + rc.d + Shepherd-managed ready marker

Conclusion

Phase 7.3 is satisfied on the current FreeBSD prototype track:

  • a root filesystem tree can now be materialized from the declarative Fruix system closure
  • the rootfs is internally coherent enough for the next image-construction phase
  • Phase 7 as a whole is now complete on the active FreeBSD amd64 prototype path