We have an existing img that we’d like to update from time to time so when we build a new batch of devices, they would not need to upgrade (or would need a smaller upgrade) as they come online.
We tried to do the cli preload command on an existing image but it appears to have doubled in size.
Is there a way to do a new preload on existing image? or remove a preloaded app to allow up to load a new one into the image?
Hey there, could you give a bit more detail about your use case? When you say existing image, do you mean an image you have already preloaded?
In the case where I wanted to create an up to date preloaded image I would start with the raw image again (i.e. a fresh balenaOS image without any application preloaded) and run the preload operation again. I don’t believe we have any method available to remove the preload from an image or to update the app contained within it but maybe @pdcastro might know! If you’re preloading the same application onto an image that you’ve already done it once it doesn’t sound like we’re doing the correct thing if the image doubles in size.
That’s right, the recommendation is to always start with a fresh, not-previously-preloaded image when running balena preload. For example, keep a fresh, not-preloaded .orig image file around that you can make copies of before preloading, e.g.:
To obtain a new fresh copy of an image, you can use balena os download or go through the process of adding a device through the web dashboard. If helpful, documentation can be found at Preloading and Preregistering.