Kernel updates

A Seed builds its kernel from its own source, so a new kernel arrives as a change to that source: a new generation. There are two ways in:

Releases are signed

A release is template.tar.gz (the pristine Seed), manifest.json (version, date, notes, the template's SHA-256, the runtime Dockerfile's SHA-256) and manifest.json.sig (Ed25519). A Seed installs a release only if:

Nothing is installed while an evolution is running. If the Seed changed its own kernel (an approved kernel evolution), the update stops and lists those files. The owner can choose to replace them.

SEED_RELEASES_URL points a Seed at a mirror (releases must still be signed by a key it carries). SEED_UPDATES=off turns checking off.

If a new kernel fails

After a kernel has run for 30 seconds, it records its commit (.seed/kernel-good) and keeps a copy of its binary (.seed/bin/seed.good). If a new kernel fails to build, or exits with an error within a minute of starting, the boot script runs that last good binary: seed kernel-rollback. It restores only the kernel's files from the last good commit, keeping everything the Seed did since, and commits that as a new generation. On the next start the Seed tells its owner what happened, with the build log. If the kernel files are already the good ones, nothing is rolled back (the problem is elsewhere, e.g. the database) and the container exits as before.

Publishing a release

Once: store the private release key as the repository secret SEED_RELEASE_KEY (and keep a copy somewhere safe). seed release keygen --out ~/seed-release.key makes one and prints the public key for kernel/update/keys.go.

Then either:

The workflow checks the secret first, so nothing is tagged without it. Then it checks the code builds, tags (when run from the button), builds the template stamped with the version and time, signs it and publishes the GitHub release that Seeds find at releases/latest.

To rotate the key, ship a release that adds the new public key, then sign with the new key from the next release on.

Edit this page on GitHub