Description
The current image does not automatically expand to use the full capacity of the storage device it's flashed to. We need the root filesystem to expand and utilize all available space on the SD card or storage device.
Current Behavior
- Image uses only the defined partition size from the WIC file
- Remaining space on the storage device is unused
- Users cannot utilize the full capacity of their SD cards
Desired Behavior
- On first boot, automatically expand the root partition to fill available space
- Filesystem should be resized to match the expanded partition
Suggested Implementation
-
Option A: First-boot systemd service
- Create a systemd service that runs on first boot
- Use
parted or fdisk to expand the partition
- Use
resize2fs to expand the filesystem
- Service disables itself after successful expansion
-
Option B: Use grow-fs feature
- Configure systemd-growfs or similar solution
- Add growfs to IMAGE_FEATURES
-
Option C: Initramfs expansion
- Handle expansion in initramfs before root mount
Technical Requirements
- Should expand the active root partition
- Must be safe and not corrupt data
- Should provide feedback in system logs
Acceptance Criteria
Description
The current image does not automatically expand to use the full capacity of the storage device it's flashed to. We need the root filesystem to expand and utilize all available space on the SD card or storage device.
Current Behavior
Desired Behavior
Suggested Implementation
Option A: First-boot systemd service
partedorfdiskto expand the partitionresize2fsto expand the filesystemOption B: Use grow-fs feature
Option C: Initramfs expansion
Technical Requirements
Acceptance Criteria