Repository navigation
Preflight
aegisctl preflight checks whether a host can run aegisd. It works
before the package is installed too, from a copied aegisctl binary, and
it never changes anything. The RPM runs it once after install.
aegisctl preflight
aegisctl preflight --jsonEach check prints PASS, WARN or FAIL, a detail line, and on
anything but a pass, the fix. The exit code sums it up:
| Exit | Meaning |
|---|---|
| 0 | every check passed |
| 1 | at least one check failed |
| 2 | no failures, but some warnings |
With --json, the output is an array of objects with check, status
and detail, plus fix when the check didn't pass.
A FAIL means aegisd won't run, or the package won't work as shipped.
A WARN means it will run, with something missing.
They run in this order.
Reads /proc/sys/kernel/osrelease and wants 6.12 or newer.
-
On failure:
FAIL - Fix: Boot a 6.12+ kernel (Rocky 10 ships one).
The probes are built and tested against 6.12, which is what Rocky 10 ships.
Looks in /proc/mounts for cgroup2 mounted at /sys/fs/cgroup.
-
On failure:
FAIL -
Fix: Remove
systemd.unified_cgroup_hierarchy=0from the kernel command line and reboot.
Checks that /sys/kernel/btf/vmlinux exists. aegisd reads kernel struct
offsets from it at every start.
-
On failure:
FAIL -
Fix: Use a kernel built with
CONFIG_DEBUG_INFO_BTF=y(Rocky's is).
Reads /sys/kernel/security/lsm and looks for bpf in the list. The
exec probes are BPF LSM programs, so without it aegisd can't attach them
and won't start.
-
On failure:
FAIL -
Fix: add
bpfto the end of the current list. The check prints the exact command, built from your list, for example:grubby --update-kernel=ALL \ --args="lsm=lockdown,capability,yama,selinux,landlock,ima,evm,bpf"A reboot is needed. If the list couldn't be read, the fix tells you to run
cat /sys/kernel/security/lsmfirst and append,bpfto what it prints. Don't setlsm=bpfon its own: that list replaces the whole set, and you'd lose SELinux.
Rocky 10.2 has bpf in the list by default. Aegis only ever prints this
command; it never edits your boot configuration.
Reads /sys/fs/selinux/enforce and wants 1.
-
On failure:
WARN -
Fix:
setenforce 1, and setSELINUX=enforcingin/etc/selinux/config.
aegisd runs with SELinux permissive or off. The warning is there because the policy module only confines it when SELinux is enforcing.
Looks for an nft executable on PATH.
-
On failure:
FAILif/etc/aegis-v2/config.tomlsetsmode = "enforce", otherwiseWARN(nft not found (needed for enforce mode, from v0.2.0)) -
Fix:
dnf install nftables
Audit mode never calls nft. Enforce mode, from v0.2.0, uses it to cut
a quarantined tree's network, and aegisd won't start in enforce mode
without it. A config that is missing or unreadable counts as audit.
Looks for a criu executable on PATH.
-
On failure:
WARN(criu not found (needed from v0.4.0)) -
Fix:
dnf install criu
Tries to connect to the control socket, /run/aegis-v2/aegisd.sock, or
the path given with --socket. A permission error counts as a pass:
the socket only lets root in, so a refusal still means aegisd is there.
-
On failure:
WARN -
Fix:
systemctl enable --now aegisd(after installing the package).
This one warns on a fresh install by design, since the daemon isn't started yet.
On a stock Rocky 10.2 host, after installing but before starting aegisd:
kernel PASS 6.12.0-211.16.1.el10_2.0.1.x86_64 (6.12 or newer needed)
cgroup2 PASS cgroup2 mounted at /sys/fs/cgroup
btf PASS /sys/kernel/btf/vmlinux present
bpf-lsm PASS bpf is in the LSM list (lockdown,capability,yama,selinux,bpf,landlock,ima,evm)
selinux PASS SELinux is enforcing
nft PASS nft found
criu PASS criu found
aegisd WARN aegisd is not running (no answer on /run/aegis-v2/aegisd.sock)
fix: systemctl enable --now aegisd (after installing the package).
The exit code there is 2.
From docs/preflight.md at v0.2.3.