# Reconfiguration of wifi adapter settings for static IP not sticking

**URL:** <https://forums.balena.io/t/reconfiguration-of-wifi-adapter-settings-for-static-ip-not-sticking/4873>\
**Category:** Product support\
**Tags:** wifi, network\
**Created:** [January 2, 2019, 9:36pm UTC](https://forums.balena.io/t/reconfiguration-of-wifi-adapter-settings-for-static-ip-not-sticking/4873 "2019-01-02T21:36:28Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![BrantR](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@BrantR](https://forums.balena.io/u/BrantR)\
**Post date:** [January 10, 2019, 10:16pm UTC](https://forums.balena.io/t/reconfiguration-of-wifi-adapter-settings-for-static-ip-not-sticking/4873/42 "2019-01-10T22:16:39Z")

</div>

Hi Paulo,  
I appreciate you taking the time to investigate here.

I am not so sure the aufs vs overlay2 is my actual problem. The essential idea is i’m just trying to preload an app into an image I have. I may be doing something completely wrong, but the core of what doesn’t work for me is that when the dockerode package in balana-cli creates, then runs the container that will download the app, its can’t find any /dev/loop\* devices. If I manually step into the container and using `docker run -it --privileged mine /bin/sh` run /usr/src/app/preload.py then the script does run and the container does have loop back devices. My problem at that point is that I don’t know what arguments (config.json?) are needed by preload.py in order to inject the app I have into the image.

I hope that makes sense. I feel like I’m digging fairly far into the tooling to see whats going wrong, just not sure how those arguments get injected against the ‘docker run’ command in order to pass it all to preload.py

Any help is appreciated.

-Brant

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [January 15, 2019, 12:10pm UTC](https://forums.balena.io/t/reconfiguration-of-wifi-adapter-settings-for-static-ip-not-sticking/4873/47 "2019-01-15T12:10:47Z")

</div>

Hi @BrantR I have a few comments:

1. aufs vs overlay2: balenaOS images use one or the other (aufs for most devices types), preloading an image using the incorrect storage driver will result in the dockerd daemon on the device not being able to load the application.
2. loop devices: `/dev/loopX` devices do not exist all the time, they are created by `losetup`. When you run `losetup -f --show resin.img`, a loop device will be created for you and should appear in `/dev/`.
3. If you copy the image you’re trying to preload in the container, you’ll have to copy it back to the host once it’s preloaded, that’s why it’s bind mounted and not copied.

I wouldn’t recommend trying to run the `preload.py` script by yourself (even if it’s possible), it has not been designed to interact with humans 🙂

But you can use `balena preload` and modify the `Dockerfile` in `node_modules/balena-preload/Dockerfile`, the `preload.py` script in `node_modules/balena-preload/src/preload.py` and the script that launches docker and communicates with `preload.py` in the container in `node_modules/balena-preload/lib/preload.js`.

Here is how the preloading container is created (you have all the options there): [https://github.com/balena-io/balena-preload/blob/v8.1.0/lib/preload.js#L160-L185](https://github.com/balena-io/balena-preload/blob/v8.1.0/lib/preload.js#L160-L185)

---

<div class="post-metadata">

**Author:** ![majorz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/majorz/32/639_2.png) [@majorz](https://forums.balena.io/u/majorz)\
**Post date:** [January 21, 2019, 10:18am UTC](https://forums.balena.io/t/reconfiguration-of-wifi-adapter-settings-for-static-ip-not-sticking/4873/51 "2019-01-21T10:18:39Z")

</div>

Hi @BrantR, were you able to successfully preload the image?

---

<div class="post-metadata">

**Author:** ![majorz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/majorz/32/639_2.png) [@majorz](https://forums.balena.io/u/majorz)\
**Post date:** [January 21, 2019, 10:18am UTC](https://forums.balena.io/t/reconfiguration-of-wifi-adapter-settings-for-static-ip-not-sticking/4873/52 "2019-01-21T10:18:46Z")

</div>

Hi @BrantR, were you able to successfully preload the image?

---

<div class="post-metadata">

**Author:** ![BrantR](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@BrantR](https://forums.balena.io/u/BrantR)\
**Post date:** [January 21, 2019, 2:23pm UTC](https://forums.balena.io/t/reconfiguration-of-wifi-adapter-settings-for-static-ip-not-sticking/4873/54 "2019-01-21T14:23:45Z")

</div>

Hi @majorz, No I never did get it to work on linux (ubuntu 18.04) or mac. Different errors in each case and I logged an issue in the project on github. Maybe others are seeing it as well?

It looked at least on the mac side related to not running the container as --privileged to get the loopback nodes to be created so the bind mounted OS image could be mounted, presumably for editing the filesystem with the app. Maybe there are some slick sudo commands that need to be passed in to allow for that behavior.

Thanks

---

<div class="post-metadata">

**Author:** ![thundron](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thundron/32/1379_2.png) [@thundron](https://forums.balena.io/u/thundron)\
**Post date:** [January 29, 2019, 6:21pm UTC](https://forums.balena.io/t/reconfiguration-of-wifi-adapter-settings-for-static-ip-not-sticking/4873/55 "2019-01-29T18:21:07Z")

</div>

Hi @BrantR, while on Linux did you try the solution proposed [here](https://github.com/balena-io/balena-cli/issues/1066#issuecomment-454783948) that is bind mounting the host’s `/dev` to the container’s `/dev`?

[Previous page](https://forums.balena.io/t/reconfiguration-of-wifi-adapter-settings-for-static-ip-not-sticking/4873.md?page=1)
