# OTA storage and rollback worksheet

Version 1. Reviewed 16 November 2026. Save this Markdown file and edit it locally.
Scope is embedded Linux A/B capacity and integration planning. This illustrative
scenario is a hand calculation and has no hardware-test provenance.

## Device requirements

Target architecture and board = unknown
Bootloader and version = unknown
Storage medium and erase geometry = unknown
Fleet backend and operational owner = unknown
Framework, version and edition = unknown
Artifact types and signing policy = unknown
Connectivity and retry requirements = unknown
Health check and commit owner = unknown
Boot-attempt limit and fallback destination = unknown
Persistent-data backward compatibility = unknown
Recovery image update and key rotation = unknown

## Editable capacity record

All values below are MiB. One MiB is 1,048,576 bytes. One MB is 1,000,000 bytes.

Total available = 2048
Reserved and boot = 128
Persistent data = 256
Recovery = 128
Installed payload per slot = 512
Growth percent = 25
Alignment = 4
Staging = 0
Additional overhead per slot = 0

Kernel, initramfs and verity data included in payload = assumed yes, verify
Staging zero permitted by installation workflow = unknown
Additional geometry, bad-block and wear reserves = unknown

## Calculation

Convert each allocation to bytes before rounding. Round grown payload up to the
next byte, add separately measured overhead once, then round up to alignment.
If separately declared partitions need alignment, include their padding too.

Grown payload = ceil(payload * (1 + growth / 100)) = 640 MiB
Slot = alignUp(grown payload + overhead, alignment) = 640 MiB
Required = reserved + persistent + recovery + staging + slot A + slot B
Required = 128 + 256 + 128 + 0 + 640 + 640 = 1792 MiB
Remaining = total - required = 256 MiB

Installed size differs from compressed transfer size. Negative remaining capacity
means the plan exceeds capacity. A capacity result does not validate device layout.
After changing inputs, recalculate every line and retain unresolved assumptions.

## Failure-test record

Use a disposable device or emulator. Copy the blank record for each case.

Cases to cover = interrupted write, invalid signature, exhausted boot attempts,
failed health check, old database with new software, new database after fallback,
lost network, failed recovery, key rotation and oldest supported migration.

Case =
Starting firmware and artifact digest =
Test environment and versions =
Expected rejection/recovery =
Observed result = not run
Log reference =
Recovery action and retry limit =
Owner and date =

## Sources

- https://rauc.readthedocs.io/en/latest/integration.html
- https://sbabic.github.io/swupdate/swupdate.html
- https://docs.mender.io/overview
- https://proteanos.com/doc/ota-updates-rauc-swupdate-mender-2026/
