ZBOSN device firmware upgrade failure: three rollback checks before restart

What a failed upgrade leaves behind

A failed firmware upgrade on a ZBOSN device leaves the unit in a state the bootloader cannot yet vouch for. The new image may be partially written, signed but never committed, or committed to a slot that did not boot. Until verification finishes, the device is neither healthy nor confirmed dead. Treat it as indeterminate.

One rule comes before the rest: do not restart until rollback status has been verified. A restart clears volatile logs and state, and if the slot mapping is wrong it can also discard the pre-upgrade image. On a device that is already in a bad state, that is how a recoverable failure becomes an unbootable one. Whatever you do after a restart, you will be working without the evidence it erased.

Recovery runs through three checks, in order. Each returns a pass or fail result and gates the next stage. Check 1 verifies that the rollback image is complete and correctly signed. Check 2 verifies that the stored configuration and parameter schema are compatible with that image. Check 3 verifies that the rollback is recorded in persistent storage, that the boot counter has settled, and that every module reports the expected version. Only after all three pass is a restart authorized.

Failure classes behind a ZBOSN firmware upgrade failure

A failed upgrade on a ZBOSN device usually falls into one of six classes. Each leaves a different footprint in storage, status registers, and version output. Classify the condition before restarting so that an ambiguous boot failure is not mistaken for a hardware defect.

Image transfer or write interruption

The candidate image is truncated, corrupted in transit, or only partly written. You will find a partial image, an incomplete write counter, or a transfer session with no completion record.

Signature or checksum mismatch

The image arrives at full length but fails signature validation or checksum comparison against the manifest. The candidate stays flagged unverified, and the device normally keeps its reference to the last verified image.

Bootloader rejection of the candidate image

The image is structurally valid, but the bootloader refuses it because of version constraints, hardware revision checks, or policy rules. The rejection reason goes into the bootloader status register, and the boot slot assignment normally does not change.

Configuration and parameter schema incompatibility

The firmware installs, but the stored configuration or parameter schema does not match the layout the new image expects. Parameters end up defaulted or partly migrated, and validation may not fail until services initialize.

Incomplete A/B slot commit

The image is written and validated, but the commit or slot switch does not finish. One slot stays marked pending or unbootable, and the active slot reference may not be updated.

Communication or interlock state mismatch that blocks first boot

First boot depends on an external communication peer or an interlock that is not satisfied. The device waits in a pre-boot state with the new image present but no application startup.

Observable indicators to record

  1. Transfer session log status, with reported byte count compared against the expected image size.
  2. Write completion flag and, where exposed, the written-region checksum for the target slot.
  3. Signature verification result and the checksum value recorded from the manifest comparison.
  4. Bootloader status register contents, including the rejection reason code.
  5. Candidate image version, build identifier, and the hardware revision compatibility field.
  6. Configuration schema version, plus any parameter migration or validation error entries.
  7. A/B slot state: active slot, pending slot, and the commit or boot-attempt counter.
  8. Interlock and peer communication status at the moment first boot was attempted.
  9. Version output from both slots where readable, captured before and after the attempted upgrade.

Capture as many of these nine as the device exposes before you change anything. Slot and counter state are overwritten by the next boot or rollback attempt, and a second pass cannot reconstruct them.

The indicators tell you which check is most likely to fail. They do not change the order in which the checks run.

Rollback Check 1: Standby image integrity and signature validation

Check 1 runs first. It answers one question: does the rollback slot hold a complete, authentic, identifiable firmware image? It does not test runtime behavior and does not decide whether the failed upgrade can be salvaged. It validates the stored artifact before the device is allowed to boot from it. Register names, slot labels, and tool paths vary by model and build; the sequence does not. Read the values from the device’s own manifest and service documentation rather than assuming the labels used here.

The check looks for three properties. The image must be complete: bootloader-compatible headers, firmware payload, and metadata all present, with no truncated or missing blocks. Its checksum or cryptographic hash must match the digest in the vendor-signed manifest. And the manifest signature must verify against the trusted vendor public key, whether that key is stored on the device or in the service tool. The check also confirms image version identity so the technician can match the rollback image to the approved release.

What the check actually inspects

  • The rollback image is read, not rewritten. In an A/B layout, an upgrade writes only to the inactive slot, so the last validated image stays byte-for-byte unchanged until the new image is committed.
  • The signed manifest is parsed again. Its digest and version metadata define what the rollback image should contain.
  • The digest is recomputed and compared. A hash is calculated over the slot contents and matched to the signed value. A mismatch means the fallback copy cannot be trusted.
  • The rollback pointer is checked. The boot configuration must point at a slot the bootloader can actually boot, not at a half-written area.

Which slot holds the known-good image?

Slot labels are a common source of confusion here. On a typical A/B layout, an upgrade writes to the inactive slot. While that write is in progress, the last validated image is still in the active slot, not the standby slot. After a successful commit the roles swap: the new image becomes active, and the former active slot becomes the standby or rollback slot. If the commit fails, the standby slot may hold nothing but a partial candidate.

The label matters less than the boot pointer. Check 1 verifies the image in the slot the bootloader would actually boot on rollback, wherever that slot sits; “standby image” in this article refers to that verified rollback target. Read the slot map before you trust either slot label. If the slot map points at the slot containing the failed candidate, stop: the rollback pointer is wrong, and checksum verification will not fix it.

Flat two-colour schematic showing an active firmware slot, a standby slot holding the known-good image, a signed manifest bar beneath both slots, and a curved rollback arrow pointing from the standby slot back to the active slot

Figure 1: Slot roles during Check 1. The rollback target is the last validated image, not automatically the inactive slot.

How the pieces fit together

Element Role in Check 1
Active slot Holds the running image; before commit, usually the last validated image
Inactive or standby slot Receives the candidate. After a failed commit it may hold a partial or rejected image, not a rollback source
Rollback target The slot the bootloader will boot after rollback; identify it from the slot map
Signed manifest Supplies the reference digest and version data used for comparison
Rollback pointer Bootloader setting that redirects the next boot to the rollback target

Run the check through service access. Depending on the build, the bootloader performs the verification during boot or on demand, and the service tool exposes the result. Where the tool can recompute the digest, it uses the vendor-specified algorithm and compares it with the published value. Record the slot identifier, image version, hash, manifest identifier, and result in the service record.

Pass criteria: the rollback slot reads back completely, the calculated hash matches the published digest exactly, the manifest signature verifies against the trusted key, and the image version matches the approved rollback target. Record these values in the service record.

If it fails: do not boot from that image. The device will typically stay in recovery mode and wait for a clean package over a wired or local connection; that is slower than another restart, and safer. Re-deploy the vendor-supplied image to the inactive slot, then repeat Check 1 against the rollback target, or escalate to vendor support if the failure persists.

After any failed upgrade, note whether the fallback path was exercised at all. A device that rolled back cleanly once is more likely to be recoverable in place; one that could not satisfy Check 1 needs hands-on attention before the next attempt.

Rollback Check 2: Configuration and parameter schema compatibility

Check 1 establishes that the image is complete and authentic. It does not establish that the device will behave correctly once that image boots. A flash image can pass every signature, checksum, and partition-map test and still fail on the first boot, because the parameter set in persistent storage may have been written by the firmware generation you are rolling back from, not the one you are returning to.

The failure is easy to miss at first. Boot may complete and the HMI may come up, and then a gantry axis refuses to home because a motion limit is read in different units. A palletizing recipe that references a pattern offset the older build never defined may load with that field defaulted to zero, so layers are placed at the wrong pitch. A calibration record written for a newer encoder resolution can be read against the old scaling and put every tool-center-point move off by millimeters. The image is valid. The device is not usable.

Configuration schema compatibility gate comparing a rollback target image against the stored configuration set

Compare revision identifiers before you commit

Treat a firmware rollback as a data migration, not just a binary swap. Read the revision identifiers from both sides and put them side by side.

Identifier Where to read it Match required
Configuration schema revision Image manifest and /etc/zbosn/config.meta Exact match, or an explicit downgrade path
Motion parameter block version motion.profile header Accepted by the target build
Palletizing recipe format version pallet.recipe header field Readable, not silently defaulted
Calibration record generation tag Calibration store index Matches the controller generation
Snapshot hash Snapshot archive manifest Verifies against the stored checksum

If configuration schema compatibility is not explicit, assume it is broken. A schema revision higher than the target build expects is the dangerous direction, because older parsers often ignore unknown fields instead of rejecting them.

Confirm a re-appliable snapshot exists

Before restarting, verify that a snapshot of the previous known-good state exists, is complete, and can be restored: correct scope (motion, palletizing, calibration, network), checksum intact, and a documented re-apply procedure you have dry-run at least once. A snapshot you cannot apply is not a rollback path.

Pass criteria: the rollback target’s schema and revision identifiers are explicitly compatible with a verified configuration snapshot, and a tested path exists to re-apply that snapshot and return the device to a matching configuration set on first boot.

If it fails: do not restart. Restore the matching snapshot from the known-good archive in a staged environment, or escalate for a configuration conversion step before the rollback proceeds.

Rollback Check 3: Confirm the rollback is recorded and durable

Checks 1 and 2 show that the image is intact and that the configuration can work with it. Check 3 shows that the device will still be on that image after the next power cycle. A rollback that exists only in RAM disappears when mains power drops, and the device comes back on the failed firmware without warning. Check 3 is what makes the rollback survive a power cycle.

Rollback Check 3 verification flow: rollback record and boot counter, version handshake, persistent commit, with the re-execute branch for uncommitted rollbacks

Read the rollback record and the boot-attempt counter

Open the rollback or fallback record in the bootloader log and read it next to the boot counter. Confirm three things: the slot pointer points to the slot holding the known-good image, the record has a valid checksum and an attempt count that matches the last boot attempt, and no automatic fallback loop is still armed. If the counter keeps incrementing on every boot, or the record still names the failed slot as primary, the fallback is cycling rather than settling. Fix the record before touching anything else.

Run the version handshake end to end

A version handshake asks every participant what firmware it is running, then compares the answers. Query the main controller, each safety and I/O module on the bus, and connected components such as HMI panels, remote I/O heads, and drive units. Every reported version must match the intended pre-upgrade combination. One module left on the new, incompatible build is a silent mismatch that often surfaces later as a bus error or a refused safety signature.

Confirm the persistent commit, not the runtime state

Runtime status pages are a common source of false confidence because they can show what is loaded rather than what is stored as the next boot target.

Verification item Where to read it What confirms a commit
Slot pointer Rollback record Points to the known-good slot with a valid CRC
Boot counter Bootloader log Stable and not incrementing after a manual reset
Module versions Version handshake All match the expected baseline set
Persistent commit Commit table or NVRAM map Stored version equals the rolled-back build

Pass criteria: the rollback record names the known-good slot with a valid checksum, the boot counter is stable and no fallback loop is armed, the version handshake returns consistent versions across the controller, safety and I/O modules, and connected components, and the persistent commit reflects the rolled-back firmware.

If it fails: treat the rollback as incomplete. Re-run the rollback procedure, force the commit, then repeat this gate. Do not restart through a half-committed rollback; that simply replays the original failure.

The table below summarizes what each check establishes and what to do when one fails.

Check What it validates Verification method Pass criteria Action if it fails Restart permitted
Check 1 – Standby image integrity and signature Rollback image is complete and vendor-signed Read the rollback slot; compute the checksum; verify the signature against the trusted public key Checksum matches the manifest; signature validates; version matches the approved target Re-deploy the vendor image to the inactive slot; repeat Check 1; escalate if it fails again No – resolve Check 1 first
Check 2 – Configuration and parameter schema compatibility Stored configuration matches the schema the target firmware expects Compare schema and revision identifiers; validate parameters against the target schema; confirm the snapshot Identifiers are compatible; parameters validate; snapshot checksum and re-apply path are verified Restore the matching snapshot or perform the approved conversion; re-run Check 2 No – resolve Check 2 first
Check 3 – Rollback record, boot counter, and version handshake Rollback record is consistent, counter is settled, versions agree, and the commit is persistent Read the record and counter from non-volatile storage; run a module handshake; compare the stored boot target Record names the known-good slot with a valid checksum; counter is below threshold and not incrementing; all modules match; persistent commit reflects the rollback Re-execute the rollback; force the commit; repeat the handshake; escalate if it fails again Yes – only after Checks 1–3 pass

All three checks must pass in sequence before a restart is permitted. A failure at any check halts the sequence, and the device stays off the reboot path until that check is corrected and re-verified.

Pre-restart verification checklist

A failed upgrade leaves the device in an unverified middle state. Restarting before the evidence is secured is how a recoverable incident becomes an outage. The checklist below turns the three checks into a repeatable gate. Each line is binary and observable: it names a condition you can confirm or reject from the device, the management console, or the signed change record. The same sequence applies whether the device stalled mid-flash, came up degraded, or dropped off the network during activation, so it can be handed to a second technician and audited later.

Work in the order shown and record each line as confirmed or rejected before moving on.

Rollback Check 1 – image integrity

  • The rollback image hash reported by the device matches the published release hash for the target build.
  • The rollback image signature validates against the vendor public key in the device trust store or the service tool’s trusted key store.
  • The version identifiers reported for the rollback image match the signed release manifest.

Rollback Check 2 – configuration and snapshot readiness

  • The active configuration validates against the schema version declared by the rollback target image.
  • A known-good snapshot covering motion, palletizing, calibration, and network settings is present, its checksum matches the entry in the change log, and its re-apply procedure has been dry-run.

Rollback Check 3 – rollback record and restart authorization

  • The committed slot pointer names the slot holding the intended rollback image and is flagged committed, not trial.
  • A rollback record exists for this upgrade attempt, with failure code, timestamp, and operator identity completed.
  • The boot counter reads below the configured automatic-rollback threshold and does not increment after a manual reset.
  • The diagnostic log export from the failed attempt is stored, and its file size is greater than zero.
  • Written approval to restart is attached to the change record and names the approver.

Any rejected or unchecked item stops the restart. A safe restart is authorized only when all ten conditions are confirmed.

The gate sequence at a glance

The schematic maps the same three gates: integrity, then configuration compatibility, then committed rollback state. A pass moves forward; a failure returns to the rollback stage. Power stability and an empty motion queue are pre-restart conditions, not a fourth check; they are covered in the next section.

A flat two-colour schematic showing an entry shape leading through three sequential verification gates, with a solid forward arrow to the restart stage on success and a dashed return path looping back to a rollback stage on failure.

Restart execution and post-restart validation

A safe restart is a controlled procedure, not a power cycle. The device leaves the rollback stage only after the restart is authorized, executed in a defined order, and accepted against explicit criteria. If acceptance fails, the device returns to the rollback stage. It is not restarted again on the assumption that a second attempt will behave differently.

Flowchart of the controlled restart path: pre-restart conditions, restart sequence, post-restart acceptance gate, low-speed functional verification, and return to production, with a failure path looping back to the firmware rollback stage.

Pre-restart conditions

Four conditions must be satisfied and recorded before you initiate the restart:

  • Checks passed. All three rollback checks are complete, with results logged against the device serial number. No upgrade job or pending write is still running, no maintenance process holds the flash partition, and power is stable (battery charged or UPS connected).
  • Log export complete. Diagnostics have been exported, opened once to confirm the archive is readable, and stored off-device.
  • Plant-side state accounted for. Motion queues are empty, axes are parked, process interlocks are in their safe state, and downstream equipment knows the device is unavailable.
  • Authorized personnel present. One operator at the HMI and one technician at the device, both aware of the abort condition.

Restart sequence

  1. Confirm and acknowledge the safe state of connected equipment.
  2. Re-energize the device and allow the bootloader to complete without interruption.
  3. Hold the device in service mode; do not load a production recipe or enable motion.
  4. Read the version registers and the configuration status before any subsystem is enabled.
  5. Record the observed values in the maintenance log.

Post-restart acceptance criteria

Post-restart validation is a pass/fail gate. Every criterion below must be satisfied.

Criterion Pass condition
Reported firmware version Matches the rollback target exactly
Fallback flag Not re-armed; remains clear
Subsystem handshake Every subsystem reports a clean, matching version
Stored configuration Loaded with no schema warnings or substituted defaults
Functional verification Axes and safety interlocks respond correctly at low speed

Functional verification is performed at low speed and reduced travel only after the configuration checks pass, and before the device is returned to production.

Rule on failed acceptance

A failed acceptance criterion returns the device to the rollback stage for diagnosis. It does not trigger another restart. Repeated restarts overwrite the evidence needed for root-cause analysis and can mask an incomplete rollback. Only after a new rollback has been performed and accepted may the restart sequence be executed again.

Diagnostic record and log-capture table

Use this table as the handover document when a rollback is escalated to vendor support or passed to a repair technician. Complete it during the rollback and immediately after the restart, so each of the three checks leaves a verifiable trace.

Record field What to capture Source Required
Failure timestamp and detection point UTC time plus the stage that failed: transfer or flash, signature check, slot commit, configuration validation, or boot handshake Controller event log Yes
Failing firmware version and build identifier Version string and build hash of the rejected image Upgrade manifest, device info page Yes
Rollback target version Version string of the previously known-good image Golden image manifest, release notes Yes
Checksum or signature verification result Digest match status and signer authorization outcome Bootloader verification output Yes
Configuration schema revision (before and after) Schema revision ID pre-upgrade and post-rollback Configuration backup metadata Yes
Slot pointer and boot counter state Active slot, rollback slot, and boot attempt count Bootloader status register Yes
Module version handshake results Each sub-module version and pass/fail result Module self-test and handshake log Yes
Error codes from bootloader or controller log Exact hex code and short message per occurrence Bootloader or controller log export Yes
Personnel or approval record Technician ID, approver, change ticket reference Rollback sign-off sheet, ITSM ticket Yes
Power and reset event history Unexpected resets, brownouts, or watchdog triggers during the window Power and reset log Conditional
Link state at failure Interface status, negotiation speed, packet loss at detection time Network diagnostic snapshot Optional

Most rows map to a specific check. The completed sheet shows where the upgrade failed, what the device reported, and who signed off on the decision to revert.

FAQ: Rollback checks before restart

What counts as a ZBOSN device firmware upgrade failure?

A ZBOSN device firmware upgrade failure is any upgrade that leaves the device unable to return to a fully validated firmware state on its own. That includes a write that times out, a version mismatch after flash, a boot loop, or a partition that reports a different build than the manifest expects. Cosmetic warnings alone do not qualify.

Why can’t a restart be used to test whether a rollback worked?

A restart proves only that the device reached some boot state. It does not prove the previous firmware is intact. Power cycling also clears volatile state, so a corrupt configuration or a partly written partition can look healthy until real work resumes. The checks read persistent version, checksum, and partition data instead, which is why they come first.

How long do the three rollback checks take to perform?

It depends on storage size, the number of modules, and how the service tool reports results. Check 1 is a read and hash comparison and is usually the shortest. Check 2 grows with the size of the configuration store and the number of parameters. Check 3 includes the version handshake across the controller and modules, so it takes longer than a read-only check. Large storage or a high module count extends any of them. Use the times from your own site’s first run, not a generic estimate.

Can a passed rollback check be reused after another upgrade attempt?

No. A passed rollback check is valid only for the firmware state it was run against. A second upgrade attempt rewrites partitions and changes checksums, so the earlier result tells you nothing about the current device state. Re-run all three checks in order after every attempt, even when the previous attempt ended in the same failure.

What do I do when Check 2 fails but Check 1 passes?

Check 1 passing means the image is intact and signed. It says nothing about the stored configuration. A Check 2 failure means the configuration or parameter schema does not match what the rollback target expects. Restore a snapshot that matches the target schema, or run the vendor’s conversion step, then repeat Check 2 and Check 3. If the configuration store itself is corrupt, restore it from the verified snapshot. Re-flashing the partition map is not a substitute for schema compatibility, and it does not clear Check 2.

When should I stop troubleshooting and escalate to vendor support?

A common threshold is two failed recovery attempts. Escalate immediately if a check reports a hardware fault or a secure-boot signature error; those can leave the device unbootable and usually require vendor involvement. Collect the check logs, firmware build numbers, and timestamps, then contact vendor support before trying anything else.

Conclusion: A fixed sequence and one decision rule

A ZBOSN device firmware upgrade failure is easier to resolve when recovery is a fixed sequence rather than a menu. The checks run in this order: verify the integrity and signature of the rollback image; confirm that the stored configuration and parameter schema are compatible with it; then confirm that the rollback is committed, the boot counter has settled, and the module versions agree.

The order is not interchangeable because each check depends on the one before it. Integrity establishes that the artifacts are trustworthy. Compatibility confirms the settings can survive the transition. A committed state confirms the device has a recoverable position to return to. Reverse the order and you validate compatibility against data that may still be corrupt, or authorize a restart before a rollback point exists.

The decision rule is simple: restart only after integrity, configuration compatibility, and committed rollback state are confirmed and documented.

Record the image hashes, profile comparisons, commit confirmation, operator name, and timestamp. That turns one recovery into evidence for the next upgrade and gives support a history instead of a reconstruction. When a case goes to ZBOSN support, the completed record gives them the state history they need.

Document all three checks, in order, before anyone issues the restart command.

Three checks, one re-deploy: weighing the effort

A full firmware re-deployment is the heaviest recovery option. Before choosing it, compare what each path costs in hands-on verification. The chart places Check 1, Check 2, Check 3, and a complete re-deploy on one relative scale.

Bar chart comparing relative verification effort for Check 1, Check 2, Check 3 and a full firmware re-deployment on an illustrative 1 to 5 scale

Values are an illustrative model of relative verification effort, not measured field data. In the model, completing all three checks costs less than a full re-deployment.

Each bar represents the verification burden of that path, from confirming boot behavior and partition state to re-flashing the whole image and re-validating every configuration. The first three bars are lower because they are targeted read-and-confirm steps you can run in sequence on a device already in hand. The fourth is taller because a re-deploy resets the device to a clean baseline, and everything you previously trusted has to be proven again.

If the three checks pass, you can move to a controlled restart without re-flashing the device. If they fail, you know which stage failed, and the re-deploy becomes an informed decision rather than a guess. Either way, you avoid the most expensive option until the evidence supports it.

Scroll to Top