# Mender.conf - How to add persistent settings with mender-convert

**URL:** <https://hub.mender.io/t/mender-conf-how-to-add-persistent-settings-with-mender-convert/2663>\
**Category:** General Discussions\
**Created:** [October 13, 2020, 3:13pm UTC](https://hub.mender.io/t/mender-conf-how-to-add-persistent-settings-with-mender-convert/2663 "2020-10-13T15:13:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HarLeyAtMender](https://avatars.discourse-cdn.com/v4/letter/h/eb9ed0/32.png) [@HarLeyAtMender](https://hub.mender.io/u/HarLeyAtMender)\
**Post date:** [October 13, 2020, 3:13pm UTC](https://hub.mender.io/t/mender-conf-how-to-add-persistent-settings-with-mender-convert/2663/1 "2020-10-13T15:13:05Z")

</div>

We are using mender-convert to generate a partitioned image from our Golden Image.

I know about the new “split” strategy for mender.conf,  
and I am also aware of the access modalitites and priorities on both files /etc/mender/mender.conf and /var/lib/mender -\> /data/mender/mender.conf is based: /etc first then /data.

As far as I can see, the file /data/mender/mender.conf is generated during mender-convert process,  
where the only two lines it contains (with “RootfsPartA” and “RootfsPartB”) are written.

But we need to have more than these two lines in the persistent /data mender.conf file.  
For example ServerURL and XXXIntervalSeconds must be user-configurable in our device and therefore also have to survive OTA updates.  
Consequently these settings need to reside in /data, not in /etc.  
This is the reason, why I need to have these lines in /data/mender/mender.conf with the initial image (output by mender-convert).

I am afraid now, that these additional lines cannot be added by a rootfs\_overlay because this would interfere with the way mender-convert generates /data/mender/mender.conf.

What can I do ?

---

<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 13, 2020, 4:07pm UTC](https://hub.mender.io/t/mender-conf-how-to-add-persistent-settings-with-mender-convert/2663/2 "2020-10-13T16:07:09Z")

</div>

I think you can use a [hook/override](https://docs.mender.io/system-updates-debian-family/convert-a-mender-debian-image/customization#hooks-overrides) to modify the file after it is created. The USER\_LOCAL\_MODIFY\_HOOKS are processed after data/mender/mender.conf is created so that should work.

---

<div class="post-metadata">

**Author:** ![HarLeyAtMender](https://avatars.discourse-cdn.com/v4/letter/h/eb9ed0/32.png) [@HarLeyAtMender](https://hub.mender.io/u/HarLeyAtMender)\
**Post date:** [October 13, 2020, 4:34pm UTC](https://hub.mender.io/t/mender-conf-how-to-add-persistent-settings-with-mender-convert/2663/3 "2020-10-13T16:34:05Z")

</div>

Many thanks for your ultra-sonic speed reply 😀  
I didn’t know that, seems to be exactly what I need.
