Skip to content

ekaos/ab-boot: init A/B boot scheme - #186

Open
jonringer wants to merge 1 commit into
masterfrom
jonringer/ab-boot
Open

jonringer wants to merge 1 commit into
masterfrom
jonringer/ab-boot

Conversation

@jonringer

Copy link
Copy Markdown
Collaborator

A/B boot via systemd-boot boot counting on existing generation BLS entries. The newest generation's entry gets a +N-0 suffix. If the health check fails after N boot attempts, systemd-boot falls back to the previous proven generation.

No new partition layout, no slot abstraction, no update tool. /run/booted-system and /run/current-system already provide the A/B semantics — the immutable Nix store guarantees both closures remain available.

A/B boot via systemd-boot boot counting on generation BLS entries.
The newest generation's entry gets a +N-0 suffix. If the health
check fails after N attempts, systemd-boot falls back to the
previous proven generation.

No special partition layout or slot abstraction. /run/booted-system
and /run/current-system already provide A/B semantics — the
immutable Nix store guarantees both closures remain available.

Also cleans up nixpkgs leftovers from systemd-boot-builder.py
(copyExtraFiles, checkMountpoints, bootspecTools stubs; fixes
rebootForBitlocker always being truthy).
Comment on lines -140 to -149
boot_json_str = run(
[
f"{BOOTSPEC_TOOLS}/bin/synthesize",
"--version",
"1",
system_directory,
"/dev/stdout",
],
stdout=subprocess.PIPE,
).stdout

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a stop gap for when boot.spec was introduced, since we don't have any computers installing ekaos on baremetal as of yet, we don't need it.

Comment thread ekaos/tests/ab-boot.nix
Comment on lines +49 to +50
machine.succeed("systemctl cat ekaos-bless-boot.service")
machine.wait_for_unit("ekaos-bless-boot.service")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only really asserts the blessed behavior, we should attempt a new working generation and reboot. Then also tests a failing generation and fallback workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant