Skip to content

AB update: dedicated verity hash partitions, UUID-based A/B boot, and trident integration#27

Closed
bfjelds wants to merge 1 commit into
aclmainfrom
user/bfjelds/ab-trident-verity-hash-partitions-20260708
Closed

AB update: dedicated verity hash partitions, UUID-based A/B boot, and trident integration#27
bfjelds wants to merge 1 commit into
aclmainfrom
user/bfjelds/ab-trident-verity-hash-partitions-20260708

Conversation

@bfjelds

@bfjelds bfjelds commented Jul 9, 2026

Copy link
Copy Markdown
Member

Replaces inline dm-verity with dedicated hash partitions and switches boot parameters from partition UUIDs to filesystem/verity superblock UUIDs, enabling A/B-agnostic boot. Also integrates trident as an RPM package.

Validation

TBD

Dedicated verity hash partitions

  • Adds HASH-A and HASH-B partitions to disk_layout_uki.json using Discoverable Partition Spec (dps-usr-verity) type GUIDs.
  • Each USR partition now has a verity_hash cross-reference pointing to its dedicated hash partition instead of using the inline verity feature flag.
  • disk_util updated to support the new dps-usr-verity partition type (x86_64 and aarch64 GUIDs) and separate-partition verity formatting via veritysetup format.

UUID-based boot (A/B agnostic)

  • UKI and GRUB kernel command lines now use filesystem and verity superblock UUIDs instead of partition UUIDs:
    • systemd.verity_usr_data=UUID=<btrfs-uuid>
    • systemd.verity_usr_hash=UUID=<verity-uuid>
    • systemd.verity_usr_options=panic-on-corruption
  • UUIDs are extracted at build time (blkid for btrfs FS UUID, veritysetup output for verity superblock UUID) and written to artifact files, then injected into UKI cmdline and GRUB config via @@FSUUID@@/@@VERITYUUID@@ placeholders.
  • The same UKI binary now works for both A and B slots since UUIDs are filesystem-level, not partition-level.

Trident integration

  • Adds trident to package_catalog.yaml.
  • Enables tridentd.socket via systemd symlink during image build.
  • Temporarily disables SELinux policy module removal (semodule -r) to unblock trident install (marked with TODO to re-enable).

Replaces

https://dev.azure.com/mariner-org/ACL/_git/acl-scripts/pullrequest/27611

…integration

Move dm-verity from inline hash mode (appended to USR partition) to
dedicated HASH-A/HASH-B partitions. Switch boot cmdline from partition
UUIDs (PARTUUID=) to filesystem/verity UUIDs (UUID=) so the same UKI
works for both A and B slots, enabling A/B updates.

Changes:
- disk_layout_uki.json: Add HASH-A (3) and HASH-B (5) partitions with
  dps-usr-verity type, renumber OEM→6 and ROOT→7
- disk_util: Add DPS_USR_VERITY_GUIDS, support verity_hash cross-ref
  to dedicated hash partition, extract verity/fs UUIDs
- build_image_util.sh: Pass --verity_uuid and --fs_uuid through the
  verity and bootloader pipeline
- grub.cfg: Use UUID= instead of PARTUUID= with hash-offset
- grub_install.sh: Inject @@FSUUID@@ and @@VERITYUUID@@ placeholders
- uki_install.sh: Read UUIDs from build artifacts instead of static
  disk_layout.json values, add --verity_uuid/--fs_uuid flags
- package_catalog.yaml: Add trident to systemd package group
- build_image_util.sh (rpm): Enable tridentd.socket at build time
- rpm_install.sh: Temporarily disable SELinux module removal to
  unblock trident install

Based on changes from user/frhuelsz/ab-update-trident branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bfjelds

bfjelds commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

folded into #28

@bfjelds bfjelds closed this Jul 13, 2026
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