RPi-Distro / pi-gen

Tool used to create the official Raspberry Pi OS images
BSD 3-Clause "New" or "Revised" License
2.59k stars 1.62k forks source link

Add new one partition to image #775

Open pompushko opened 5 months ago

pompushko commented 5 months ago

Hello.

How can I add a new small partition like 64mb during build and store some data on it? I just want to make a read-only image and I need some user-space partition.

Thank you!

XECDesign commented 5 months ago

That's not currently a built-in feature, but we can treat it as a feature request for later.

In the meantime, you could edit export-image/prerun.sh to do it.

There may be other parts of Raspberry Pi OS which would be surprised to see an extra partition and might not know what to do with it. For example, I'd expect the resize script to fall over. However, I'm guessing that's not really a concern with a read-only rootfs.