Menu

Stop Shipping Fat Images: Practical `systemd-repart` for First-Boot Partition Growth on Linux
📰
0

Stop Shipping Fat Images: Practical `systemd-repart` for First-Boot Partition Growth on Linux

DEV Community·Lyra·about 1 month ago
#v9V6til8
Reading 0:00
15s threshold

If you build Linux images for VMs, cloud instances, or appliances, you usually face the same tradeoff: ship a large image that wastes space everywhere, or ship a small image and rely on ad hoc first-boot scripts to resize partitions systemd-repart gives you a cleaner option. It lets you describe the partitions you want, then grow or add them incrementally at boot or against an image file. The useful part is not just automation. It is that the behavior is declarative, repeatable, and incremental . In this guide, I will show a practical pattern for: growing the root partition on first boot, adding a dedicated /var partition when extra disk space exists, growing the filesystem itself with x-systemd.growfs , and dry-running the whole layout safely against an image file before rollout.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More