Install shirudo#
shirudo installs in one of two roles. The operator host holds the signing key and builds, signs and publishes. A target verifies and enforces. Each role has its own package, built from a checkout, and one host takes one role. This page installs the packages, or the same files from source, and lists what a target needs before it enforces anything.
Before you begin#
Decide which hosts are operators and which are targets. Operator and target explains the split.
A checkout of shirudo on a build host that meets the build requirements in System requirements.
dpkg-deb(packagedpkg-dev) to build.debpackages, orrpmbuild(packagerpmon Debian and Ubuntu,rpm-buildon Fedora) to build.rpmpackages.The target package links everything statically and installs on any supported distribution. The operator package links the build host’s shared libraries, so build it on the distribution you install it on.
Packages#
Package |
Host |
Installs |
|---|---|---|
|
Operator host |
It depends on clang 23, LLVM and |
|
Target |
It carries no key and no configuration file. |
Both packages install /usr/bin/shirudo, so they conflict, and a host
holds only one of them. On a development host that plays both roles, run
shirudo from a checkout as in the Quickstart.
Build the packages#
In the checkout, build the
.debpackages:$ make -C packaging bindeb-pkg
The build starts from
make clean, rebuilds with the prefix/usrand writesshirudo-target_<version>_<arch>.debandshirudo-operator_<version>_<arch>.debto the checkout root. For.rpmpackages, runmake -C packaging binrpm-pkginstead, which writesshirudo-target-<version>-<release>.<arch>.rpmandshirudo-operator-<version>-<release>.<arch>.rpm.To build the operator package for another distribution, build only that package on a host of that distribution:
$ make -C packaging bindeb-pkg PKG_ROLES=operator
PKG_ROLES=targetbuilds only the target package. On Fedora, which ships no staticlibcrypto, the operator build also downloads and builds a static OpenSSL forshirudo-quote-checkand needsperlandglibc-staticfor it.
Install the operator package#
Install the package on the operator host:
# apt install ./shirudo-operator_<version>_<arch>.deb
On an RPM distribution, run
dnf install ./shirudo-operator-<version>-<release>.<arch>.rpm.Check that
shirudofinds its helper:operator$ shirudo build --help ... SHIRUDO_BUILD, /usr/libexec/shirudo/shirudo-build, then shirudo-build on PATH. ...
The second path is where the package installed the helper.
Install the target package#
Install the package on the target:
# apt install ./shirudo-target_<version>_<arch>.deb ... shirudo: shirudo.service enabled; it runs 'shirudo init' early on the shirudo: next boot. To enforce now: systemctl start shirudo.service shirudo: shirudo-map-export.timer enabled for the next boot shirudo: shirudo-keepalive.timer enabled for the next boot shirudo: shirudo-xdp-reconcile.timer enabled for the next boot shirudo: shirudo-bpm-repo-update.timer enabled for the next boot shirudo: shirudo-bpm-tree-sync.timer enabled for the next boot
On an RPM distribution, run
dnf install ./shirudo-target-<version>-<release>.<arch>.rpm. The RPM prints the same lines on its first installation.The package enables
shirudo.serviceand the five timers for the next boot and starts none of them. Startingshirudo.serviceby hand does nothing yet, whatever the message says: the unit runs only when/run/shirudo/runtimeis mounted, and the shirudo initrd mounts it at boot. Removing the package disables the units again.Check the pre-flight on the target:
target# shirudo init --check-only
It lists each prerequisite of
initwith its result and changes no enforcement state. On a fresh target it reports what is still missing, such as the certificate.
Install the target from a tarball#
make -C packaging bintar-pkg builds two target tarballs,
shirudo.tar.gz and shirudo-static.tar.gz. Both carry the same
static target binary and the other files of the target package, with the
binaries under /usr/local/bin.
Unpack the tarball on the target:
$ tar -xzf shirudo.tar.gz
Run its installer as root:
# ./shirudo-installer/install.sh shirudo installer: installed into /
The installer copies the files and reloads systemd. It enables no unit: enable
shirudo.serviceand the timers yourself withsystemctl enable. SetDESTDIR=<dir>to stage the files into<dir>instead.
Install from source#
The install targets of the checkout install the same files as the
packages, with the binaries under /usr/local unless you set
prefix. Like the packages, the two roles install the same
bin/shirudo, so install one role per host.
On an operator host, build and install the operator role:
# make install-operator
On a target, build and install the target role:
# make install-target
This builds OpenSSL, libcurl and tpm2-tss from source first and links the static target binary against them and the static archives that System requirements lists. It enables no unit.
Check the installation on either host:
$ shirudo version
It prints the release and the version ID that
upatch load --expect-version-idcompares against.
Before a target enforces#
Installing shirudo-target protects nothing by itself. A target
enforces once it boots through the shirudo initrd with everything that
init verifies there:
A kernel that meets System requirements, booted with the BPF LSM active and with
bpf.keyring_unsealed=1 dm_verity.keyring_unsealed=1, so thatinitcan enroll the trusted certificates and then seal the.bpfand.dm-veritykeyrings.A TPM 2.0 that the kernel exposes as
/dev/tpmrm0.The operator’s certificate in
/var/lib/shirudo/keys/cert.der, which the dracut module copies into the initrd.A dm-verity runtime image and a signed config image, built on the operator host with the image generators, and the bootstrap configuration that names them.
An initrd built with
shirudo-gen-initrd, booted from an authenticated unified kernel image.A drop-in that makes
shirudo.servicerun the binary on the runtime image instead of/usr/bin/shirudo, whichshirudo-gen-runtimewrites. On a protected target shirudo runs only from the runtime image, so the timer services need the same change to work. The generator does not write drop-ins for them.
Boot integration sets these up. After the reboot,
shirudo status on the target shows Status: ok with every
condition OK, and shirudo status --show-full shows Bound in:
initrd.
Next steps#
Boot integration brings an installed target up.
Deployment checklist lists every step of a rollout.
Manage signing keys creates the signing key on the operator host.
Quickstart tries everything in a test VM first.