home / docs / build-pipeline / mkfs-root
Finalizing the root as the filesystem you chose.
scripts/mkfs-root.sh is the final stage of the build pipeline. Given your chosen TARGET_FS, it formats and assembles $ROOT so the disk reflects exactly the filesystem you selected at install.
The filesystem tooling is built in stage 2 from your choice — if you picked zfs, you get ZFS tools; if reiserfs, you get its (unmaintained) tooling, after a stability warning. Whatever you choose, the tooling and the format match.
stage 3 is a rootfs that will boot — with the exact filesystem, kernel, init, and tools you picked. That's the whole pipeline in one line.