Start Documentation

How it works

What boots a board, what runs on it, and which step checks which.

A board boots a small recovery system from your server. An agent inside it writes the operating system and then keeps the board managed. This page follows that path and says what is checked at each step.

The parts

PartWhere it runsWhat it does
ServerYour machine, or our hosted serviceWeb UI and API, the device channel, OS image storage, and the signer that prepares bootloaders
BootloaderThe board's EEPROMHolds the server's name and public key, and fetches the recovery system
Recovery imageThe board's RAMA 98 MB Linux system with the agent inside. It does not touch the drive by itself
AgentRecovery, and later the installed OSConnects out to the server, runs your commands and reports back

Network boot without PXE

The board uses the HTTP boot built into the Raspberry Pi bootloader:

  1. It gets an ordinary address from the network's DHCP server.
  2. Its bootloader asks the server, by name, for the recovery image and its signature over HTTP on port 80.
  3. It checks the signature against the key it holds, loads the image into RAM and starts it.

Nothing changes on the router, and the server can be on another network or on the internet. Plain HTTP is enough because the bootloader checks the signature: an image signed by another key does not boot.

The bootloader learns the server's name and key once per board: from the browser over USB, with a provisioning card, or from a board that already runs Linux (Adding a device).

From blank to ready

  1. You approve the board by its hardware serial.
  2. The server prepares a bootloader for that board and the agent writes it.
  3. The board boots the recovery system from the server.
  4. The agent streams the OS image you picked onto the drive.
  5. The agent installs itself into the new system with the board's own credential.
  6. The board boots from its drive and reports in.

Over the internet this takes about six minutes on a Compute Module 4 or 5 (Installing an operating system).

When the OS is broken

A board whose drive cannot be booted goes round its boot order and asks the server again, about every 30 seconds. Set its Boot behavior to Recovery and the next request gets the recovery system. No power cycle is needed. In two runs a board with a wiped drive was back in recovery 57 and 73 seconds after the switch.

A board that cannot boot its drive reaches recovery on its own after the switch; the wait is fast-forwarded

A board whose system starts and then hangs does not ask again by itself. It needs a reboot: a power cycle, or a watchdog you armed beforehand (Hardware and the watchdog).

What checks what

StepChecked byHow
Recovery imageBootloaderRSA signature made with the server's own key, created when you turn network boot on
Agent in recoveryBootloaderThe agent is part of the signed image. Recovery downloads no code
OS imageAgentSHA-256 sent with the install command. The agent writes the first part of the image last, so a drive that fails the check never becomes bootable
Agent packageServer, then agentSignature made on hardware keys kept offline. The server checks a release on import, the agent checks the package before installing it
Commands and secretsTLSThe device channel uses TLS whenever the server has an https address

The agent carries the public keys that verify agent packages, so a board installs only agents signed for the build it runs. A fork built from source replaces that key set and signs its own releases (ARTIFACT-SIGNING.md).

Where the chain stops

Next: Adding a device.