Updating passive rootfs partitions in script and directory updates

arpit.ts
Tue, 23 Mar 2021 17:25:58 +0000
General Discussions

Hi
I made a simple script artifact using mender-artifact write module-image -T script ... and a single script file test.sh. All the script does is create a /home/pi/test-file file and does nothing else. After deploying this on my device, I could see that the script ran and the file test-file indeed got created.
However, after taking out the SD card from the raspberry pi and looking at its partitions, the file /home/pi/test-file was only present on one of the rootfs partitions, not both. Is this how it’s supposed to work? I expected that since the update got committed (the device’s system software version got updated on hosted.mender.io) it would automatically update the passive partition as well with the file changes.
If I’m looking at this incorrectly, please help point me to the correct documentation that describes the intended behaviour.
Also, I haven’t tried this out with directory update module but I expect that it should also update the passive partition with the directory changes once the update succeeds. Please tell me if I’m wrong here also.
Thanks

2 posts - 2 participants