There are occasions where a quick fix is needed in the read-only partition and going through the standard release takes more time than we can afford. Remounting as read-write and patching the code is the quick and dirty solution but as we use differential (delta) updates, a dirty fs blocks future delta updates of course. We thought of a workaround and we would like your feedback on this.
Assume the machine has p2 as active partition and p3 as inactive. Runs mender 2.6.1 and artifact v1 that needs patching which will be later released as v2. Here are the suggested steps:
- dd p2 to p3
- Remount p2 as rw and change anything needs changing
- When we need to deploy v2 (set mender_boot_part, mender_boot_part_hex and upgrade_available) reboot to p3
- Initiate delta update v1-to-v2 from mender cloud
We expect to reboot back to p2 with v2 clean filesystem. Are we missing something?