Dir-overlay-install

Hello Mender,

I am trying https://github.com/mirzak/dir-overlay-install with read-only filesystem.

Should we modify dir-overlay-install scripts to enable update on read-only filesystem?
What would be correct way to handle update on read-only filesystem?

Some logs:
Oct 13 21:16:39 iqube mender[2137]: time=“2020-10-13T21:16:39Z” level=info msg="Update module output: tar: can’t remove old file ./usr/bin/app: Read-only file system"
Oct 13 21:16:39 iqube mender[2137]: time=“2020-10-13T21:16:39Z” level=error msg=“Update module terminated abnormally: exit status 1”
Oct 13 21:16:39 iqube mender[2137]: time=“2020-10-13T21:16:39Z” level=error msg=“Update module terminated abnormally: exit status 1”
Oct 13 21:16:39 iqube mender[2137]: time=“2020-10-13T21:16:39Z” level=error msg=“transient error: Update module terminated abnormally: exit status 1”
Oct 13 21:16:39 iqube mender[2137]: time=“2020-10-13T21:16:39Z” level=error msg=“transient error: Update module terminated abnormally: exit status 1”
Oct 13 21:16:39 iqube mender[2137]: time=“2020-10-13T21:16:39Z” level=info msg=“State transition: update-install [ArtifactInstall] -> rollback [ArtifactRollback]”

Many thanks.
Rostislav

1 Like

What would your objective be in doing this type of update to a read only filesystem? Usually that is enabled to ensure that the entire filesystem is identical to what was originally installed so doing incremental updates is a bit odd here.

You can temporarily enable read-write in a pre-install state script:

$ sudo mount -o remount,rw /

and then put it back in read-only mode after the install:

$ sudo mount -o remount,ro /

But note that if you are using RO for purposes of mender-binary-delta updates, this will not work. Applying the binary deltas requires that the active filesystem be completely unmodified.

Drew

Drew,
we use RO to ensure that filesystem on SD card will not be broken e.g. when there is power failure. Many thanks for the tips.
Rostislav