# Dir-overlay-install

**URL:** <https://hub.mender.io/t/dir-overlay-install/2666>\
**Category:** General Discussions\
**Created:** [October 14, 2020, 9:07am UTC](https://hub.mender.io/t/dir-overlay-install/2666 "2020-10-14T09:07:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spinarr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/spinarr/32/527_2.png) [@spinarr](https://hub.mender.io/u/spinarr)\
**Post date:** [October 14, 2020, 9:07am UTC](https://hub.mender.io/t/dir-overlay-install/2666/1 "2020-10-14T09:07:34Z")

</div>

Hello Mender,

I am trying [https://github.com/mirzak/dir-overlay-install](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

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [October 14, 2020, 1:33pm UTC](https://hub.mender.io/t/dir-overlay-install/2666/2 "2020-10-14T13:33:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![spinarr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/spinarr/32/527_2.png) [@spinarr](https://hub.mender.io/u/spinarr)\
**Post date:** [October 15, 2020, 5:32pm UTC](https://hub.mender.io/t/dir-overlay-install/2666/3 "2020-10-15T17:32:23Z")

</div>

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
