How should I set the partition sizes for a 32GB SD card on Raspbian?

Hi all,

I am setting up a golden image to be used with mender-convert. I’m a little confused by these different options:
MENDER_STORAGE_TOTAL_SIZE_MB
MENDER_BOOT_PART_SIZE_MB
MENDER_DATA_PART_SIZE_MB

I installed a few packages on Raspian Bullseye 32bit but they definitely took 3-5gb of space. My SD card is 32GB.

I used the “dd” command which resulted in a ~32GB image.

How should I set the above settings? I’d like 3-4GB extra incase we decide to install more packages down the line. Otherwise I’ll want an ample amount of persistent data.

Thanks in advance.

Hi @bp1313,

Wow, 3-5GB of actual payload on a Raspbian? That definitely feels bloated. As a rule of thumb, I would suggest something like this:

  • boot partition: 128-256MB
  • root partitions: 2x current size
  • data partition: remaining.

If the root filesystem takes up 4GB by now, then I would for example make partitions A and B 8GB each.

Note: this is a personal opinion, your use case and requirements may differ.

Greetz,
Josef