apertus-open-source-cinema / axiom-firmware

AXIOM firmware (linux image, gateware and software tools)
GNU General Public License v3.0
171 stars 54 forks source link

resize filesystem to full size on first boot #159

Open rroohhh opened 4 years ago

rroohhh commented 4 years ago

Probably using systemd-growfs

herbertp commented 4 years ago

While I consider this a good idea, I'm not sure we should have 'one' filesystem and grow that to the full size ... why?

SD cards vary significantly in size, even for SD cards marketed as 16GB or 32GB, so if you take three different 16GB SD cards, you will likely end up with three different sizes. This results in a lot of grieve when trying to backup, restore or simply copy the entire SD image. Some SD cards even get very slow at the end of the available space.

I see some partial solutions for this problem: 1) have some special command to 'compact' the filesystem again before you make a copy/do a backup. 2) have a separate, non critical partition which can be considered 'temporary storage' and doesn't need to be backed up/restored and/or can be recreated if incomplete, etc. 3) make sure to leave some empty space and/or resize to a 'known good' size smaller than the actual SD size, e.g. 14GB for a 16GB card, etc. 4) have special tools to create compact backups which are (mostly) platform independent.