When installing the Official OpenWrt Factory image onto devices with large internal flash storage (e.g., 32 GB eMMC on a device like the NanoPi R6S), the resulting filesystem partition table consistently allocates only a minimal size to the writeable /overlay partition, leaving the vast majority of the 'block' storage (>30 GB) unutilised
Current State:
Total Flash Size:32 GB (e.g., /dev/mmcblk1)
/overlay (Writeable JFFS2/UBIFS) is limited to ≈100 MB.
Constrained to ≈100 MB of storage for package installation, kernel logs, and configuration, leading to rapid storage exhaustion (df -h shows the small size).
To utilise the remaining space, I am forced to perform clunky manual configuration steps post-installation:
- Manually format the large, unmounted partition (
/dev/mmcblk1p3). - Manually configure the OpenWrt fstab via
ucito mount this partition to a secondary location (e.g.,/opt). - Manually manage application data, configuration, and packages to use the new
/optmount point.
This requires significant technical knowledge and is error-prone. More importantly, large packages must be installed to /overlay first and then manually transferred or linked to /opt, which is dangerous if the package temporarily exceeds the ≈100 MB /overlay limit, causing installation failure and potential system instability. You also need to adjust opkg.conf
I am aware that some vendor forks, like FriendlyWrt, use a script to automatically mount the partition as /opt, which, while functional, is still a compromise*
The goal is to seamlessly leverage the full storage capacity for package installation and user data immediately after flashing the OpenWrt factory image, just as standard Linux distributions do.
Proposal:
Implement Automated Filesystem Expansion
Could the OpenWrt installation scripts, specifically the image-generation and first-boot routines, be modified to implement one of the following:
- Automated Overlay Expansion:During first boot
Ddetect the presence of the large, unformatted partition (i.e./dev/mmcblk1p3), format it automatically, and configure it as an expansion of the writable/overlaypartition - Automated Data Partition/Mount:
If full expansion is deemed too complex, automatically format the partition and configure a persistent /opt` mount point during first boot. This mirrors the successful functionality seen in third-party forks but would be official and consistent.
Implementing such a feature would significantly improve usability high-capacity devices, eliminate the need for tricky manual workarounds, and align OpenWrt's storage utilisation with higher capacity storage.