Skip to content

mkimage.sh: loop-partition race — mkfs.vfat hits /dev/loopNp1 before the kernel publishes it #818

Description

@VijitSingh97

Seen cutting the RC20 release image on the release box while the KVM battery ran alongside: os/rauc/mkimage.sh failed at mkfs.vfat: unable to open /dev/loop0p1: No such device or address right after image allocation — the classic losetup -P race where the partition nodes aren't published yet, made likelier by loop-device churn from a concurrent battery run. A plain retry succeeded and verify-image passed 53/53, which is the fingerprint of a timing race, not a layout error.

Fix direction: after losetup -P, run udevadm settle and/or poll for the expected partition nodes with a bounded retry before the first mkfs. One guarded wait; the failure mode otherwise lands exactly when the box is busiest (release day).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    appliancePithead OS appliance work — lands on feat/phase2-bakery-imagebugSomething isn't workinginfraDeployment, packaging, releases

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions