Skip to main content
Rugix Bakery 0.9.6 is here: Build rules for custom image pipelines and verified boot for EFI and Raspberry Pi. Read the release post.
Documentation

core/debian-efi-verified-setup

Configure Debian for signed systemd-boot UKIs and verified A/B roots.

Configure Debian for signed systemd-boot UKIs and verified A/B roots.

Inputs

system-config

Kind: file

Rugix Ctrl system configuration. Defaults to the standard verified A/B layout.

bootstrap-config

Kind: file

Rugix bootstrap layout. Optional @SYSTEM_SIZE@ placeholders use system_size.

Default input bindings:

{
  "system-config": {
    "path": "recipes/debian-efi-verified-setup/files/system.toml"
  },
  "bootstrap-config": {
    "path": "recipes/debian-efi-verified-setup/files/bootstrap.toml.in"
  }
}

Parameters

system_size

Default: 4294967296

Default minimum A/B system capacity in bytes after bootstrap.

secondary_config

Default: false

Use the secondary configuration partition layout. Must match the EFI image rule’s secondary-config parameter.

Scheduling

Priority

1000

Dependencies

debian-verified-root

Higher priorities run first within the selected recipe set unless before or after constraints require otherwise. Dependencies include other recipes without ordering them.

Behavior

Prepare a Debian root for signed EFI A/B releases using Rugix Ctrl’s built-in systemd-boot flow. The recipe installs an AMD64 or ARM64 kernel and systemd-boot. Its core/debian-verified-root dependency installs the verity initramfs hooks.

Rugix Ctrl boot groups pair GPT system partitions system-a and system-b with UKI files EFI/Linux/rugix-a.efi and rugix-b.efi on the EFI System Partition (ESP). Each system partition contains SquashFS and appended verity data. The systemd-boot flow selects and commits these entries.

The ESP is partition config, Rugix Ctrl’s configuration partition, mounted at /run/rugix/mounts/config. Boot file slots use paths under that mount. Native bootstrap preserves the ESP, expands A’s partition capacity, creates an empty B system partition, and creates data in the remaining drive space. Rugix Ctrl then mounts data and manages its root overlay and persistent state.

The custom /etc/rugix/system.toml maps system partitions and UKI file slots to systemd-boot entries. Slots use immutable = true: their installed bytes remain unchanged, so Rugix Ctrl can retain payload hashes for slot verification.

Keep /etc/fstab consistent with the Rugix-managed mounts. Use core/image-debian-efi-verified for the matching factory image and update bundle. Firmware certificate enrollment remains a separate provisioning step.

Use Rugix Ctrl 1.4.0 or later. It resumes bootstrap after an interrupted first boot. Pin an exact release with core/rugix-ctrl’s version parameter, as shown in the example below.

Configuration

The system-config and bootstrap-config inputs default to this recipe’s standard verified A/B configuration. Supply your own files to customize boot slots, the data partition, or partition layout. For example:

[inputs."core/debian-efi-verified-setup"]
system-config = { path = "config/system.toml" }
bootstrap-config = { path = "config/bootstrap.toml" }

The supplied files must match the image layout and verified-root boot contract. Both are rendered and installed at their usual paths under /etc/rugix/. The bootstrap file can contain @SYSTEM_SIZE@ placeholders, replaced by the recipe’s system_size parameter. This parameter defaults to 4 GiB per system slot. Existing factory capacities of the ESP are preserved; data receives the remaining drive space.

Configure update-bundle trust and other Rugix Ctrl policy separately in /etc/rugix/ctrl.toml.

Example

For example, define an EFI layer:

parent = "core/debian-trixie"
recipes = ["core/debian-efi-verified-setup"]

[parameters."core/rugix-ctrl"]
version = "v1.4.0"

Set the system architecture to amd64 or arm64, then pass the same value as the EFI build rule’s required architecture parameter. The Debian EFI rule shows the matching build configuration.

Secondary Configuration Partition

For example, enable the secondary config layout in a layer:

[parameters."core/debian-efi-verified-setup"]
secondary_config = true

Set parameters.secondary-config = true on the EFI image rule as well. Existing installations need a separate partition-layout migration before receiving this root configuration; update bundles do not add partitions. The factory reserves an empty config-secondary as partition 2, equal in capacity to config. Bootstrap preserves both config partitions and places system-a, system-b, and data at partition numbers 3, 4, and 5. The secondary partition can stage a complete replacement ESP, including systemd-boot; writing and activating that replacement requires a separate operation.

Custom system configurations can use @SYSTEM_A_PARTITION@, @SYSTEM_B_PARTITION@, and @DATA_PARTITION@ placeholders for these partition numbers. Custom bootstrap plans can use @SECONDARY_CONFIG@ to insert the secondary partition entry after config and before system-a, as shown in the bundled template. It expands to a named partition with size = 0, preserving its factory capacity, or to empty text when disabled. Custom configurations without these placeholders are used as supplied.