Skip to main content
Version: Next 🚧

Manual Upgrades

Upgrades can be run manually from the terminal.

Kairos images are released on quay.io.

Note

Looking to upgrade from a private registry OCI image? Check the Private registry auth page.

Listing available versions​

Using the agent, you can list all the available versions to upgrade to.

$ sudo kairos-agent upgrade list-releases
v0.57.0
v0.57.0-rc2
v0.57.0-rc1
v0.57.0-alpha2
v0.57.0-alpha1

Use the --registry flag to specify a custom registry to retrieve the versions from, otherwise it will default to quay.io/kairos.

Upgrading the active system​

To specify an image, use the --source flag:

sudo kairos-agent upgrade --source <type>:<address>

The type selects where the image comes from. oci, ocifile, dir, file, ssh and p2p are supported, and the same types work for install and reset. Image sources describes each one, where it can be set, and has an example for every source and action.

For example, to upgrade to the latest available stable release from the default Kairos registry:

sudo kairos-agent upgrade --source oci:quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1

To upgrade offline from a container image previously saved with docker save and copied to the node:

# On a machine with registry access:
docker save quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1 -o kairos-upgrade.tar
# Copy kairos-upgrade.tar to the target node, then on the node:
sudo kairos-agent upgrade --source ocifile:/var/share/kairos-upgrade.tar

To upgrade from an already extracted root filesystem on the node:

sudo kairos-agent upgrade --source dir:/tmp/extracted-rootfs

To upgrade from another Kairos node, without a registry or a file copy, see the ssh source and the experimental p2p source:

sudo kairos-agent upgrade --source ssh://root@10.0.0.5

Once you have tested the new system and are happy with it, you can upgrade the recovery system.

Upgrading the recovery system​

The recovery system is there for a reason, to help you recover the active system in case of failure. This is why we don't allow upgrading the active system and recovery one at the same time and it needs to be done in a separate step. It's advised to also upgrade the recovery system often, to keep it close to the active one. This will make sure you have a familiar system to work with, when you boot to the recovery system instead of an old image you haven't used for quite a long time.

Warning

Only upgrade the recovery system, when you are sure that the active system is running correctly.

To make this process less error prone, the upgrade command provides an extra flag that will upgrade the recovery only. It uses the same system and flags as the normal upgrade.

sudo kairos-agent upgrade --recovery --source oci:quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1

A recovery system cannot be upgraded from an ssh source. A p2p source needs the recovery image of a node, p2p://.../recovery, see Image sources.

What about the passive system?​

The passive system is the one that is not running. It is not possible to upgrade it directly. The passive system will be upgraded when the active system is rebooted.

Upgrading single entries (trusted boot installations)​

On systems installed in "trusted boot" mode, it's not possible to edit the cmdline without generating a new bootable image because the cmdline is part of the signed artifact. For this reason, custom cmdlines are generated as separate artifacts at build time. Being different artifacts though, means that they will need to be upgraded too.

This can be achieved by passing the name of the efi file (without the extension) to the upgrade command like this:

kairos-agent upgrade --source oci:quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1 --boot-entry <efi_file_name_here>

You can find the efi file name by listing all the efi files in the installed system:

ls /efi/EFI/kairos/*.efi