Core20 custom image: default rootfs size too small

So I’m building a custom Ubuntu Core 20 image (stock but with some added local snaps for testing purposes) using ubuntu-image. Everything worked for a while, but now suddenly I am getting an error WARNING: rootfs structure size 1.17 GiB smaller than actual rootfs contents 1.27 GiB. I know this issue was raised earlier on the forum.

My temporary solution has been to download the pi gadget snap, unsqashfs, edit gadget.yaml to increase the size from 1200M to 1500M. Which seems to work. But this is a temporary hack at best. It disconnects the gadget snap from the store, and makes it quite difficult to automate the process for faster iterations.

Does anyone know of any other way to set the rootfs size without having to resort to manual poking each time?

1 Like

This reply may not be super helpful to you, but thought it worth mentioning for general info purposes.

In our case, we have a Brand Store, so we simply maintain and publish our own gadget snaps. This obviously gives us complete control over gadget config without any manual process or hackery. Not suitable for everyone, but for some it would be worth considering.

Cheers, Just

Absolutely, a Brand Store would solve a lot of issues, but not likely to get one any time soonish. Hence the hack-around/need to automate.

Thank you none the less. Good to know that this will become easier once we (hopefully) get to the Brand Store stage.