Dualayer Hierarchy Standard (DHS 1.1): https://github.com/Zainium-Dynamics/dualayer-hierarchy-stand...
Full Specification (PDF): https://zainiumdynamics.tech/dhs
DHS 1.1 defines a layered filesystem hierarchy for Linux systems assembled from separate layers, along with a layout for running musl and glibc side by side without conflict. Either C library can be primary; the distribution chooses.
What the root directory (/) looks like:
A DHS root directory contains only the following entries:
/ |-- overlayer/ (the entire operating system: all layers) |-- home/ (user home directories) |-- root/ (root user home directory) |-- dev/ (devtmpfs) |-- proc/ (procfs) |-- sys/ (sysfs) |-- run/ (tmpfs; removable media mounts at /run/media/user/label) `-- tmp/ (temporary files) FHS directories (/usr, /bin, /sbin, /lib, /lib32, /lib64, /libx32, /etc, /var, /boot) must not exist at /, not even as symlinks. Keeping them absent enforces layer boundaries so software cannot write into the base.How /overlayer is structured:
/overlayer/ |-- syshub/ (read-only base OS; boots and runs without userland) |-- userland/ (mutable layer for installed packages: union/, work/, registry/) |-- ignition/ (kernels, initramfs, bootloader; mounted read-only) |-- agents/ (optional instructions/policies for AI coding agents) `-- .syshub-pending/ (staged atomic base upgrade, applied by initramfs at next boot) At boot, initramfs composes /overlayer/syshub (lower) and /overlayer/userland/union (upper) via OverlayFS.Dual-libc isolation (musl and glibc side by side):
Each C library lives in its own GNU target-triplet directory (arch-vendor-linux-musl and arch-vendor-linux-gnu) with its own dynamic loader, headers, loader config, C++ runtime, and toolchain. Shared directories (/overlayer/syshub/bin, lib, include) belong strictly to the primary C library, and library search paths never cross. Both C libraries read shared system configuration (passwd, hosts, resolv.conf, zoneinfo) from /overlayer/syshub/etc.
Running FHS software:
Foreign packages are adapted at install time (loader, library paths, pkg-config, shebangs). Runtime FHS path lookups are handled by a path resolver and loader redirection, with the known LD_PRELOAD limitation for statically linked and setuid binaries documented in Chapter 7.
Reference implementation (Zainium OS):
Zainium OS (https://github.com/Zainium-Dynamics) is the reference implementation of DHS 1.1:
- Layer names: syshub (base), zexlib (userland), zaisys (ignition) - C library design: Design A (musl primary in base, glibc as a userland package) - Boot composition, staged upgrades, rollback: quantra-ramfs - Package manager, receipts, base protection: zex - Path resolution, loader redirection, toolchain switching: libsys_resolver.so, sys-resolver - Protected paths (refuses destructive ops on base/ignition): elevate, elevate-pam Comments URL: https://news.ycombinator.com/item?id=50645376
Points: 1
# Comments: 0

