# Where does mender-client save the incoming download?

**URL:** https://hub.mender.io/t/where-does-mender-client-save-the-incoming-download/4160
**Category:** General Discussions
**Created:** [October 7, 2021, 9:09pm UTC](https://hub.mender.io/t/where-does-mender-client-save-the-incoming-download/4160 "2021-10-07T21:09:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![dat-tran-matternet](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dat-tran-matternet/32/1381_2.png) [@dat-tran-matternet](https://hub.mender.io/u/dat-tran-matternet)
#### Post date: [October 7, 2021, 9:09pm UTC](https://hub.mender.io/t/where-does-mender-client-save-the-incoming-download/4160/1 "2021-10-07T21:09:52Z")

</div>

Where does mender-client save the incoming download? My rootfs is read-only; only the data partition is read-write. I’m assuming it writes somewhere to the data partition? If so, where?

thanks

---

<div class="post-metadata">

### Author: ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)
#### Post date: [October 7, 2021, 9:48pm UTC](https://hub.mender.io/t/where-does-mender-client-save-the-incoming-download/4160/2 "2021-10-07T21:48:28Z")

</div>

I’m pretty certain it streams it and overwrites the non-active partition as it streams, hence not requiring any intermediate storage requirements.

---

<div class="post-metadata">

### Author: ![dat-tran-matternet](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dat-tran-matternet/32/1381_2.png) [@dat-tran-matternet](https://hub.mender.io/u/dat-tran-matternet)
#### Post date: [October 7, 2021, 10:00pm UTC](https://hub.mender.io/t/where-does-mender-client-save-the-incoming-download/4160/3 "2021-10-07T22:00:12Z")

</div>

Thanks for your reply. I can understand that with the rootfs update but what about custom update module like firmware to microcontrollers in the system?

For example I’m writing a update module to program my stm32 micro. Where is the argument FILES pointing to?

set -e

STATE="$1"  
FILES="$2"

BLE\_RESET=112  
BLE\_MODE=113  
BLE\_DEV=/dev/ttyS2

---

<div class="post-metadata">

### Author: ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)
#### Post date: [October 7, 2021, 10:40pm UTC](https://hub.mender.io/t/where-does-mender-client-save-the-incoming-download/4160/4 "2021-10-07T22:40:47Z")

</div>

Sorry i dont use update modules myself, so don’t have first hand experience of using them, however a quick bit of github detective work looks like the modules working directory is relative to the mender datastore, of which the datastore is on the data partition by default but is configurable.

> <https://github.com/mendersoftware/mender/blob/master/conf/paths.go#L43>

> <https://github.com/mendersoftware/mender/blob/master/cli/cli.go#L407>

---

<div class="post-metadata">

### Author: ![dat-tran-matternet](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dat-tran-matternet/32/1381_2.png) [@dat-tran-matternet](https://hub.mender.io/u/dat-tran-matternet)
#### Post date: [October 7, 2021, 10:54pm UTC](https://hub.mender.io/t/where-does-mender-client-save-the-incoming-download/4160/5 "2021-10-07T22:54:25Z")

</div>

That’s great news. Thank you!
