# Both rootfs partitions are called "primary" after a failed update

**URL:** <https://hub.mender.io/t/both-rootfs-partitions-are-called-primary-after-a-failed-update/828>\
**Category:** General Discussions\
**Tags:** feedback\
**Created:** [July 16, 2019, 1:46pm UTC](https://hub.mender.io/t/both-rootfs-partitions-are-called-primary-after-a-failed-update/828 "2019-07-16T13:46:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ster](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ster/32/282_2.png) [@ster](https://hub.mender.io/u/ster)\
**Post date:** [July 16, 2019, 1:46pm UTC](https://hub.mender.io/t/both-rootfs-partitions-are-called-primary-after-a-failed-update/828/1 "2019-07-16T13:46:38Z")

</div>

Minor feedback:

I noticed that after a roll-back following unsuccessful ArtifactCommit (e.g. if reboot happened after reboot from Mender), both rootfs partitions are named “primary” (for example when I insert SD card in my PC ). Even though it doesn’t break Mender, I wouldn’t call it expected behavior, some may base their scripts on partition names.

![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/66421356858123dff0521c38a6a270edef5b602f.png)

Here are the logs just in case:

> **update logs**
>
> 2019-07-16 11:04:09 +0000 UTC info: Running Mender version 2.0.0  
> 2019-07-16 11:04:09 +0000 UTC debug: handle update fetch state  
> 2019-07-16 11:04:09 +0000 UTC debug: status reported, response 204 No Content  
> 2019-07-16 11:04:09 +0000 UTC debug: Received fetch update response &{200 OK 200 HTTP/1.1 1 1 map[Accept-Ranges:[bytes] Etag:[“b463fda25fa3a64bc6776860206364b8”] Server:[openresty/1.13.6.2] Content-Type:[application/vnd.mender-artifact] X-Amz-Request-Id:[15B1DE600A821B9C] X-Frame-Options:[DENY] X-Content-Type-Options:[nosniff] Date:[Tue, 16 Jul 2019 11:04:09 GMT] Vary:[Origin] X-Xss-Protection:[1; mode=block] Strict-Transport-Security:[max-age=63072000; includeSubdomains; preload] Connection:[keep-alive] Content-Security-Policy:[block-all-mixed-content] Last-Modified:[Sat, 13 Jul 2019 11:26:36 GMT] Content-Length:[724988416]] 0x11dfc40 724988416 [] false false map[] 0x1088380 0x131c720}+  
> 2019-07-16 11:04:09 +0000 UTC info: State transition: update-fetch [Download\_Enter] -\> update-store [Download\_Enter]  
> 2019-07-16 11:04:09 +0000 UTC debug: handle update install state  
> 2019-07-16 11:04:09 +0000 UTC debug: status reported, response 204 No Content  
> 2019-07-16 11:04:09 +0000 UTC debug: Read data from device manifest file: device\_type=raspberrypi3  
> 2019-07-16 11:04:09 +0000 UTC debug: Current manifest data: raspberrypi3  
> 2019-07-16 11:04:10 +0000 UTC info: installer: authenticated digital signature of artifact  
> 2019-07-16 11:04:10 +0000 UTC debug: checking if device [raspberrypi3] is on compatibile device list: [raspberrypi3]  
> 2019-07-16 11:04:10 +0000 UTC debug: installer: processing script: ArtifactInstall\_Enter\_01\_retain\_wpa\_supplicant  
> 2019-07-16 11:04:10 +0000 UTC debug: installer: successfully read artifact [name: test\_hub\_V2.0\_raspbian04.2018\_Scanner5.1.0-mender; version: 3; compatible devices: [raspberrypi3]]  
> 2019-07-16 11:04:10 +0000 UTC debug: Trying to install update of size: 4097835008  
> 2019-07-16 11:04:10 +0000 UTC debug: Active partition: /dev/mmcblk0p2  
> 2019-07-16 11:04:10 +0000 UTC debug: Detected inactive partition /dev/mmcblk0p3, based on active partition /dev/mmcblk0p2  
> 2019-07-16 11:04:10 +0000 UTC info: native sector size of block device /dev/mmcblk0p3 is 512, we will write in chunks of 1048576  
> 2019-07-16 11:04:10 +0000 UTC info: opening device /dev/mmcblk0p3 for writing  
> 2019-07-16 11:04:10 +0000 UTC info: partition /dev/mmcblk0p3 size: 4097835008  
> 2019-07-16 11:29:47 +0000 UTC info: wrote 4097835008/4097835008 bytes of update to device /dev/mmcblk0p3  
> 2019-07-16 11:29:48 +0000 UTC debug: status reported, response 204 No Content  
> 2019-07-16 11:29:48 +0000 UTC info: State transition: update-store [Download\_Enter] -\> update-after-store [Download\_Leave]  
> 2019-07-16 11:29:48 +0000 UTC info: State transition: update-after-store [Download\_Leave] -\> update-install [ArtifactInstall]  
> 2019-07-16 11:29:48 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-16 11:29:48 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-16 11:29:48 +0000 UTC debug: start executing script: ArtifactInstall\_Enter\_01\_retain\_wpa\_supplicant  
> 2019-07-16 11:29:49 +0000 UTC debug: status reported, response 204 No Content  
> 2019-07-16 11:29:51 +0000 UTC error: stderr collected while running script /var/lib/mender/scripts/ArtifactInstall\_Enter\_01\_retain\_wpa\_supplicant [artifact\_name=hub\_V2.0\_raspbian04.2018\_Scanner5.1.0: Running ArtifactInstall\_Enter\_01\_retain\_wpa\_supplicant  
> ]  
> 2019-07-16 11:29:51 +0000 UTC debug: status reported, response 204 No Content  
> 2019-07-16 11:29:51 +0000 UTC debug: status reported, response 204 No Content  
> 2019-07-16 11:29:51 +0000 UTC debug: Inactive partition: /dev/mmcblk0p3  
> 2019-07-16 11:29:51 +0000 UTC debug: Marking inactive partition (/dev/mmcblk0p3) as the new boot candidate.  
> 2019-07-16 11:29:51 +0000 UTC info: Enabling partition with new image installed to be a boot candidate: 3  
> 2019-07-16 11:29:51 +0000 UTC debug: Have U-Boot variable: mender\_check\_saveenv\_canary=1  
> 2019-07-16 11:29:51 +0000 UTC debug: List of U-Boot variables:map[mender\_check\_saveenv\_canary:1]  
> 2019-07-16 11:29:51 +0000 UTC debug: Have U-Boot variable: mender\_saveenv\_canary=1  
> 2019-07-16 11:29:51 +0000 UTC debug: List of U-Boot variables:map[mender\_saveenv\_canary:1]  
> 2019-07-16 11:29:51 +0000 UTC debug: Marking inactive partition as a boot candidate successful.  
> 2019-07-16 11:29:51 +0000 UTC info: State transition: update-install [ArtifactInstall] -\> reboot [ArtifactReboot\_Enter]  
> 2019-07-16 11:29:51 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-16 11:29:51 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-16 11:29:51 +0000 UTC debug: handling reboot state  
> 2019-07-16 11:29:51 +0000 UTC debug: status reported, response 204 No Content  
> 2019-07-16 11:29:51 +0000 UTC info: rebooting device(s)  
> 2019-07-16 11:29:51 +0000 UTC info: Mender rebooting from active partition: /dev/mmcblk0p2  
> 2019-07-05 08:46:30 +0000 UTC info: Running Mender version 2.0.0  
> 2019-07-05 08:46:30 +0000 UTC info: State transition: init [none] -\> after-reboot [ArtifactReboot\_Leave]  
> 2019-07-05 08:46:30 +0000 UTC debug: Have U-Boot variable: mender\_check\_saveenv\_canary=1  
> 2019-07-05 08:46:30 +0000 UTC debug: List of U-Boot variables:map[mender\_check\_saveenv\_canary:1]  
> 2019-07-05 08:46:30 +0000 UTC debug: Have U-Boot variable: mender\_saveenv\_canary=1  
> 2019-07-05 08:46:30 +0000 UTC debug: List of U-Boot variables:map[mender\_saveenv\_canary:1]  
> 2019-07-05 08:46:30 +0000 UTC debug: Have U-Boot variable: upgrade\_available=1  
> 2019-07-05 08:46:30 +0000 UTC debug: List of U-Boot variables:map[upgrade\_available:1]  
> 2019-07-05 08:46:30 +0000 UTC info: State transition: after-reboot [ArtifactReboot\_Leave] -\> after-reboot [ArtifactReboot\_Leave]  
> 2019-07-05 08:46:30 +0000 UTC debug: handling state after reboot  
> 2019-07-05 08:46:30 +0000 UTC info: State transition: after-reboot [ArtifactReboot\_Leave] -\> update-commit [ArtifactCommit\_Enter]  
> 2019-07-05 08:46:30 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-05 08:46:30 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-05 08:46:30 +0000 UTC debug: handle update commit state  
> 2019-07-05 08:46:30 +0000 UTC error: failed to report status: Put [https://mender.mydomain.io/api/devices/v1/deployments/device/deployments/b3a3513b-3892-46f6-9e00-e44834c1462f/status:](https://mender.mydomain.io/api/devices/v1/deployments/device/deployments/b3a3513b-3892-46f6-9e00-e44834c1462f/status:) dial tcp: lookup [mender.mydomain.io](http://mender.mydomain.io) on 192.168.1.1:53: dial udp 192.168.1.1:53: connect: network is unreachable  
> 2019-07-05 08:46:30 +0000 UTC error: error reporting update status: reporting status failed: Put [https://mender.mydomain.io/api/devices/v1/deployments/device/deployments/b3a3513b-3892-46f6-9e00-e44834c1462f/status:](https://mender.mydomain.io/api/devices/v1/deployments/device/deployments/b3a3513b-3892-46f6-9e00-e44834c1462f/status:) dial tcp: lookup [mender.mydomain.io](http://mender.mydomain.io) on 192.168.1.1:53: dial udp 192.168.1.1:53: connect: network is unreachable  
> 2019-07-05 08:46:30 +0000 UTC error: Failed to send status report to server: transient error: reporting status failed: Put [https://mender.mydomain.io/api/devices/v1/deployments/device/deployments/b3a3513b-3892-46f6-9e00-e44834c1462f/status:](https://mender.mydomain.io/api/devices/v1/deployments/device/deployments/b3a3513b-3892-46f6-9e00-e44834c1462f/status:) dial tcp: lookup [mender.mydomain.io](http://mender.mydomain.io) on 192.168.1.1:53: dial udp 192.168.1.1:53: connect: network is unreachable  
> 2019-07-05 08:46:30 +0000 UTC info: State transition: update-commit [ArtifactCommit\_Enter] -\> update-pre-commit-status-report-retry [ArtifactCommit\_Enter]  
> 2019-07-16 11:30:02 +0000 UTC info: Running Mender version 2.0.0  
> 2019-07-16 11:30:02 +0000 UTC error: Update was interrupted in state: update-commit  
> 2019-07-16 11:30:02 +0000 UTC info: State transition: init [none] -\> rollback [ArtifactRollback]  
> 2019-07-16 11:30:02 +0000 UTC debug: transitioning to error state  
> 2019-07-16 11:30:02 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-16 11:30:02 +0000 UTC info: performing rollback  
> 2019-07-16 11:30:02 +0000 UTC debug: Have U-Boot variable: mender\_check\_saveenv\_canary=1  
> 2019-07-16 11:30:02 +0000 UTC debug: List of U-Boot variables:map[mender\_check\_saveenv\_canary:1]  
> 2019-07-16 11:30:02 +0000 UTC debug: Have U-Boot variable: mender\_saveenv\_canary=1  
> 2019-07-16 11:30:02 +0000 UTC debug: List of U-Boot variables:map[mender\_saveenv\_canary:1]  
> 2019-07-16 11:30:02 +0000 UTC debug: Have U-Boot variable: upgrade\_available=0  
> 2019-07-16 11:30:02 +0000 UTC debug: List of U-Boot variables:map[upgrade\_available:0]  
> 2019-07-16 11:30:02 +0000 UTC debug: will try to rollback reboot the device  
> 2019-07-16 11:30:02 +0000 UTC info: State transition: rollback [ArtifactRollback] -\> rollback-reboot [ArtifactRollbackReboot\_Enter]  
> 2019-07-16 11:30:02 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-16 11:30:02 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-16 11:30:02 +0000 UTC info: rebooting device(s) after rollback  
> 2019-07-16 11:30:02 +0000 UTC info: Mender rebooting from inactive partition: /dev/mmcblk0p2  
> 2019-07-16 11:30:17 +0000 UTC info: Running Mender version 2.0.0  
> 2019-07-16 11:30:17 +0000 UTC info: Update was interrupted in state: rollback-reboot  
> 2019-07-16 11:30:17 +0000 UTC info: State transition: init [none] -\> verify-rollback-reboot [ArtifactRollbackReboot\_Leave]  
> 2019-07-16 11:30:17 +0000 UTC debug: transitioning to error state  
> 2019-07-16 11:30:17 +0000 UTC debug: Have U-Boot variable: mender\_check\_saveenv\_canary=1  
> 2019-07-16 11:30:17 +0000 UTC debug: List of U-Boot variables:map[mender\_check\_saveenv\_canary:1]  
> 2019-07-16 11:30:17 +0000 UTC debug: Have U-Boot variable: mender\_saveenv\_canary=1  
> 2019-07-16 11:30:17 +0000 UTC debug: List of U-Boot variables:map[mender\_saveenv\_canary:1]  
> 2019-07-16 11:30:17 +0000 UTC debug: Have U-Boot variable: upgrade\_available=0  
> 2019-07-16 11:30:17 +0000 UTC debug: List of U-Boot variables:map[upgrade\_available:0]  
> 2019-07-16 11:30:17 +0000 UTC info: State transition: verify-rollback-reboot [ArtifactRollbackReboot\_Leave] -\> after-rollback-reboot [ArtifactRollbackReboot\_Leave]  
> 2019-07-16 11:30:17 +0000 UTC debug: handling state after rollback reboot  
> 2019-07-16 11:30:17 +0000 UTC info: State transition: after-rollback-reboot [ArtifactRollbackReboot\_Leave] -\> update-error [ArtifactFailure]  
> 2019-07-16 11:30:17 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-16 11:30:17 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-16 11:30:17 +0000 UTC debug: handle update error state  
> 2019-07-16 11:30:17 +0000 UTC info: State transition: update-error [ArtifactFailure] -\> cleanup [Error]  
> 2019-07-16 11:30:17 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-16 11:30:17 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-16 11:30:17 +0000 UTC debug: Handling Cleanup state  
> 2019-07-16 11:30:17 +0000 UTC info: State transition: cleanup [Error] -\> update-status-report [none]  
> 2019-07-16 11:30:17 +0000 UTC debug: statescript: timeout for executing scripts is not defined; using default of 1h0m0s seconds  
> 2019-07-16 11:30:17 +0000 UTC debug: handle update status report state  
> 2019-07-16 11:30:17 +0000 UTC error: failed to report status: Put [https://mender.mydomain.io/api/devices/v1/deployments/device/deployments/b3a3513b-3892-46f6-9e00-e44834c1462f/status:](https://mender.mydomain.io/api/devices/v1/deployments/device/deployments/b3a3513b-3892-46f6-9e00-e44834c1462f/status:) dial tcp: lookup [mender.mydomain.io](http://mender.mydomain.io) on 192.168.1.1:53: dial udp 192.168.1.1:53: connect: network is unreachable  
> 2019-07-16 11:30:17 +0000 UTC error: error reporting update status: reporting status failed: Put [https://mender.mydomain.io/api/devices/v1/deployments/device/deployments/b3a3513b-3892-46f6-9e00-e44834c1462f/status:](https://mender.mydomain.io/api/devices/v1/deployments/device/deployments/b3a3513b-3892-46f6-9e00-e44834c1462f/status:) dial tcp: lookup [mender.mydomain.io](http://mender.mydomain.io) on 192.168.1.1:53: dial udp 192.168.1.1:53: connect: network is unreachable  
> 2019-07-16 11:30:17 +0000 UTC error: failed to send status to server: transient error: reporting status failed: Put [https://mender.mydomain.io/api/devices/v1/deployments/device/deployments/b3a3513b-3892-46f6-9e00-e44834c1462f/status:](https://mender.mydomain.io/api/devices/v1/deployments/device/deployments/b3a3513b-3892-46f6-9e00-e44834c1462f/status:) dial tcp: lookup [mender.mydomain.io](http://mender.mydomain.io) on 192.168.1.1:53: dial udp 192.168.1.1:53: connect: network is unreachable  
> 2019-07-16 11:30:17 +0000 UTC info: State transition: update-status-report [none] -\> update-retry-report [none]  
> 2019-07-16 11:32:40 +0000 UTC debug: wait complete  
> 2019-07-16 11:32:40 +0000 UTC info: State transition: update-retry-report [none] -\> update-status-report [none]  
> 2019-07-16 11:32:40 +0000 UTC debug: handle update status report state  
> 2019-07-16 11:32:41 +0000 UTC debug: status reported, response 204 No Content  
> 2019-07-16 11:32:41 +0000 UTC debug: attempting to upload deployment logs for failed update

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [July 17, 2019, 5:45am UTC](https://hub.mender.io/t/both-rootfs-partitions-are-called-primary-after-a-failed-update/828/2 "2019-07-17T05:45:56Z")

</div>

I think this will happen on ALL updates, not just failed ones. One  
possible solution would be to label the filesystem after  
`MENDER_ARTIFACT_NAME`. Pull requests are welcome!
