Use krep rootfs to build a Kreato Linux root filesystem. krep replaces the
standalone Kreastrap tool but keeps its INI configuration format.
Requirements
Rootfs builds require Linux and root privileges. Use a disposable Kreato Linux
build environment with kpkg, configured package repositories, and the native
build dependencies. You also need Git, a C toolchain, Nim with Nimble, and Make.
The full krep build needs native libraries including OpenSSL and libarchive.
make deps installs the Nim dependencies, not the host libraries.
Rootfs builds can install host packages and use chroots and mounts. Do not run them on a host you cannot safely change. A container needs the permissions needed for these operations; an unprivileged container is not sufficient for every build.
Build krep
git clone https://github.com/kreatolinux/src
cd src
make deps
make krep
./out/krep rootfs --help
The build stages resources in out/share/krep. To install both the executable
and resources, use sudo make install_krep (default prefix: /usr/local).
Building krep on macOS does not make the Linux image tasks work there.
Select a profile and output directory
Profiles live in krep/data/rootfs/arch/ARCHITECTURE/configs/. The defaults are
--arch=amd64 and --buildType=builder. Check which profiles exist for your
architecture before selecting one. An architecture option alone does not provide
a cross-compilation environment.
Copy a profile and review it before building:
cp krep/data/rootfs/arch/amd64/configs/builder.conf ./rootfs.conf
# Edit rootfs.conf, especially General.BuildDirectory, before continuing.
sudo ./out/krep rootfs --arch=amd64 --buildType=builder --configPath="$PWD/rootfs.conf"
[General] BuildDirectory selects the rootfs output directory. Bundled profiles
use /out; this is not the source tree’s ./out binary directory. Relative
output paths are resolved against the directory where you invoke krep.
BuildPackages=yes builds packages from source; BuildPackages=no installs
binaries from the configured repository. Availability depends on that repository.
The [Core] section selects libc, compiler, core utilities, TLS library, and init.
The [Extras] section adds packages. See
kreastrap.conf(5) for the retained INI format.
Do not use the output rootfs directory for unrelated files.
Resources and sandboxing
--dataDir=/path/assets/rootfsselects a command-specific resource directory.--configPath=/path/profile.confoverrides the selected profile.--overlayPath=/path/overlayoverrides the overlay directory. The configuration’suseOverlaysetting still controls whether it is used.KREP_DATA_DIR=/path/assetsselects a unified data root withrootfs/andiso/children. Pass it explicitly throughsudo envif needed.--useCacheIfPossibledefaults to true.--noSandboxdefaults to false. It disables kpkg’s source-build sandbox; only use it inside an appropriate external isolation boundary.
Use the result
The command writes a rootfs directory, including /etc/kreato-release. It does
not itself produce a rootfs tarball. Review the result and its login policy before
using it. Use the installation guide for an installed
system, or prepare its kernel, indexed modules, init, and services for
krep iso.