Error creating a basic firmware update for testing purposes

I tried this tutorial Mender-Convert and opted for the Docker version. Currently, the image from here is running on my Raspberry Pi. I downloaded the same image cleanly from the Raspberry Pi homepage (Bullseye 2022-09-22) and then completed the configuration on another Raspberry Pi. Since the image is quite large, I used PiShrink to shrink it, and then I processed it with mender-convert as described in the tutorial. The deployment went smoothly until the end when a rollback occurred. This is the Log:

2023-09-19 13:39:59 +0000 UTC info: Running Mender client version: 3.5.1 2023-09-19 13:39:59 +0000 UTC info: State transition: update-fetch [Download_Enter] -> update-store [Download_Enter] 2023-09-19 13:39:59 +0000 UTC info: No public key was provided for authenticating the artifact 2023-09-19 13:39:59 +0000 UTC info: Opening device "/dev/mmcblk0p3" for writing 2023-09-19 13:39:59 +0000 UTC info: Native sector size of block device /dev/mmcblk0p3 is 512 bytes. Mender will write in chunks of 1048576 bytes 2023-09-19 13:44:30 +0000 UTC info: All bytes were successfully written to the new partition 2023-09-19 13:44:30 +0000 UTC info: The optimized block-device writer wrote a total of 1847 frames, where 1270 frames did need to be rewritten (i.e., skipped) 2023-09-19 13:44:31 +0000 UTC info: Wrote 1935900672/1935900672 bytes to the inactive partition 2023-09-19 13:44:31 +0000 UTC info: State transition: update-store [Download_Enter] -> update-after-store [Download_Leave] 2023-09-19 13:44:31 +0000 UTC info: State transition: update-after-store [Download_Leave] -> mender-update-control-refresh-maps [none] 2023-09-19 13:44:31 +0000 UTC info: State transition: mender-update-control-refresh-maps [none] -> mender-update-control [none] 2023-09-19 13:44:31 +0000 UTC info: State transition: mender-update-control [none] -> update-install [ArtifactInstall] 2023-09-19 13:44:31 +0000 UTC info: Enabling partition with new image installed to be a boot candidate: 3 2023-09-19 13:44:31 +0000 UTC info: State transition: update-install [ArtifactInstall] -> mender-update-control-refresh-maps [none] 2023-09-19 13:44:31 +0000 UTC info: State transition: mender-update-control-refresh-maps [none] -> mender-update-control [none] 2023-09-19 13:44:31 +0000 UTC info: State transition: mender-update-control [none] -> reboot [ArtifactReboot_Enter] 2023-09-19 13:44:31 +0000 UTC info: Rebooting device(s) 2023-09-19 13:44:31 +0000 UTC info: Mender rebooting from active partition: /dev/mmcblk0p2 2023-09-19 13:44:32 +0000 UTC error: error forwarding from client to backend: websocket: close 1006 (abnormal closure): unexpected EOF 2023-09-19 13:44:32 +0000 UTC warning: error while sending close message: write tcp 127.0.0.1:45105->127.0.0.1:36778: use of closed network connection 2023-09-19 13:44:32 +0000 UTC info: Daemon terminated with SIGTERM 2023-09-19 13:45:44 +0000 UTC info: Running Mender client version: 3.5.1 2023-09-19 13:45:44 +0000 UTC info: State transition: init [none] -> after-reboot [ArtifactReboot_Leave] 2023-09-19 13:45:44 +0000 UTC error: transient error: Reboot to the new update failed. Expected "upgrade_available" flag to be true but it was false. Either the switch to the new partition was unsuccessful, or the bootloader rolled back 2023-09-19 13:45:44 +0000 UTC info: State transition: after-reboot [ArtifactReboot_Leave] -> rollback [ArtifactRollback] 2023-09-19 13:45:44 +0000 UTC info: Performing rollback 2023-09-19 13:45:44 +0000 UTC info: No update available, so no rollback needed. 2023-09-19 13:45:44 +0000 UTC info: State transition: rollback [ArtifactRollback] -> rollback-reboot [ArtifactRollbackReboot_Enter] 2023-09-19 13:45:44 +0000 UTC info: Rebooting device(s) after rollback 2023-09-19 13:45:44 +0000 UTC info: Mender rebooting from inactive partition: /dev/mmcblk0p2 2023-09-19 13:45:44 +0000 UTC info: Daemon terminated with SIGTERM 2023-09-19 13:46:23 +0000 UTC info: Running Mender client version: 3.5.1 2023-09-19 13:46:23 +0000 UTC info: Mender shut down in state: rollback-reboot 2023-09-19 13:46:23 +0000 UTC info: State transition: init [none] -> verify-rollback-reboot [ArtifactRollbackReboot_Leave] 2023-09-19 13:46:23 +0000 UTC info: State transition: verify-rollback-reboot [ArtifactRollbackReboot_Leave] -> after-rollback-reboot [ArtifactRollbackReboot_Leave] 2023-09-19 13:46:23 +0000 UTC info: State transition: after-rollback-reboot [ArtifactRollbackReboot_Leave] -> update-error [ArtifactFailure] 2023-09-19 13:46:23 +0000 UTC info: State transition: update-error [ArtifactFailure] -> cleanup [Error] 2023-09-19 13:46:23 +0000 UTC info: State transition: cleanup [Error] -> update-status-report [none] 2023-09-19 13:46:23 +0000 UTC info: Device unauthorized; attempting reauthorization 2023-09-19 13:46:23 +0000 UTC info: Output (stderr) from command "/usr/share/mender/identity/mender-device-identity": using interface /sys/class/net/eth0 2023-09-19 13:46:23 +0000 UTC info: successfully received new authorization data from server https://eu.hosted.mender.io 2023-09-19 13:46:23 +0000 UTC info: Local proxy started 2023-09-19 13:46:23 +0000 UTC info: Reauthorization successful

Hi @lukashuewe,

Thanks for reaching out. The logs indicate that at 13:44:32 the reboot was initiated, and rollback started at 13:45:44. This is usually enough time for a (failed) boot process, so the question is what happened. Is the device accessible? Can you retry and watch the terminal for messages? Plus, is this a one-off error, or did it never work yet? Does it work without using the PiShrink tool?

Greetz,
Josef