Skip to content

No build-time feedback when a slot image is larger than its target partition #442

Description

@ostrufka

I have a RAUC use case where a persistent partition's content ends up baked into the rootfs. The auto-sized ext4 grows across builds until, one day, rauc install fails in the field with a slot-too-small error — with no earlier warning.

Currently, bundle.bbclass packs whatever artifact a slot names, but gives no build-time feedback when a slot image is larger than the partition it targets. An oversized rootfs ext4 is only rejected at install time on the target — long after the bundle was built and shipped. As Enrico Jörns noted in #173, "what is critical is the partition size, as this can prevent you from installing larger ext4 file system images" — but nothing surfaces that at build.

Enrico Jörns also mentioned in #109: "Having more (or more explicit) checks would be great... first-line defense". Based on that, I was thinking we could add an opt-in slot varflag, e.g. RAUC_SLOT_rootfs[maxsize] = "1G". When set, bundle.bbclass compares the packed image's size against it and warns (opt-in fatal) at build time. The size is user-declared, so meta-rauc stays layout-agnostic — it never infers partition geometry, it just checks against what you told it. Using the same 1024-based suffixes as wic's --fixed-size would keep [maxsize] = "1G" consistent with the .wks.

Does this direction fit what you'd want in meta-rauc? If so, I'm happy to open a PR with the check + a test. Open to your preferred shape (varflag name, warn-vs-fatal default).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions