How can I add persistent changes in /mnt/boot/config.json

In order for some of our devices to work we need to set some UDEV rules. We added them manually to the config.json and that works. However on switching from local to release mode the config.json seems to reset to the default value and we have to change it manually again. Also for every new device we have to manually change this and we would like to have this automated. Is this possible?

Hi Toby, can you just confirm you’re using /mnt/boot/config.json and not /boot/config.json? Thanks.

Yes, is there a difference?

Yes, but you’re editing the right file so don’t worry about that! So in theory switching between local and non-local mode shouldn’t touch your udev rules. Is it changing anything else in your config.json? You mentioned it is reverting to default value, could you send me a before & after copy?

I’m pretty sure only the UDEV rules under ‘os’ were removed. I’ll see if I can reproduce it tomorrow and give you more details.

More importantly, I don’t really want to manually update this file for every new device. Is there no convenient method to do this? Other than us writing our own script?

I’m pretty sure only the UDEV rules under ‘os’ were removed. I’ll see if I can reproduce it tomorrow and give you more details.

Thanks, I will do the same now and see how I get along so we can compare results tomorrow.

More importantly, I don’t really want to manually update this file for every new device. Is there no convenient method to do this? Other than us writing our own script?

I’ll get back to you on this ASAP.

1 Like

Hi Guys…
I’ve been googeled (or Binged :):)) to this post because i am looking a way to mount on my RPI3 device an USB drive to be able to use IT on every hosted containers of my device (without the need to have a specialized container that mount the USB drive and share it via Samba or NFS …)
It seems that it can be done using a custom config.json file ? Is it possible ? And does someone know where to find a documention about what we are able to customize it.

Regards from France.

@stef2001
Your question is quite a bit different than the thread. Can you please start a new one?
I could answer, but that would drag on this thread further.

Thanks

@tobyhijzen being able to set custom udev rules via the dashboard is a feature that is wip.

Please track https://github.com/balena-io/balena-supervisor/issues/998

1 Like

Okey, thank you

I tried to reproduce the error a couple of times without effect. For now everything seems to work.