Changing hostOS ethernet settings

Hi,

I have a BalenaOS device running and connected to BalenaCloud via a Wifi interface.
I need also my device to be connected to another local network via another Ethernet interface. But I forgot to do the setup before flashing the OS (with this documentation: https://www.balena.io/docs/reference/OS/network/2.x/#setting-a-static-ip)

How can I add new Ethernet settings in a running device ? I’ve tried to create a new file in system-connection but the file system is in read-only so I cannot create it.

I read about is interacting with the NetworkManager via its DBUS API (https://www.balena.io/docs/reference/OS/network/2.x/#changing-the-network-at-runtime) but I’m not sure if this solution applies to me since I want to do it directly from the HostOS (not from a container), and with Ethernet (not Wifi). I haven’t tried because changing network configuration can be dangerous and I don’t want to “lose” my device.

Thanks for helping me

Hi,

All the connection files are stored inside /mnt/boot/system-connections in the hostOS, it’s RW so you can add a new connection file with your ethernet interface here. Please let us know how it goes.

Oh ok! Indeed it works ! I was looking in /resin-boot/system-connections.

Also, I noticed /etc/NetworkManager/system-connections/. Here it seems to be RW.

Why there are 3 folders and what are the differences ?

Thanks

Hi Lucas,

The system-connections folder is supposes to contain NetworkManager connection files (https://www.balena.io/docs/reference/OS/network/2.x/#introduction). You can name these files as you like, and they correspond to different NetworkManager profiles that you might want to use.

Ok understood. Thanks a lot for the answer!