How can I make more space for software

I just installed OpenWrt on a LibreRouter v1. Most of the storage space is assigned to /tmp. Very little is assigned to /overlay and this means that I cannot install the software I want. How can I modify the partition scheme in order to have more space for software? I think 1 MB more would be enough.

Here's the df -h output.

root@yellow:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.8M      3.8M         0 100% /rom
tmpfs                    59.6M      1.0M     58.6M   2% /tmp
tmpfs                    59.6M     68.0K     59.5M   0% /tmp/root
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock5            1.9M      1.5M    484.0K  76% /overlay
overlayfs:/overlay        1.9M      1.5M    484.0K  76% /

I see the extroot documentation, but I'm not sure if that's relevant, since I just want to reorganize the in-device storage space, not add a new storage device.

OpenWrt firmware will take less flash space if you build it with your desired packages using the firmware selector. This may be enough to pick-up the space you need.

Click the "Customize installed packages" drop down, then add luci and any other packages you want and click "Request build". Then download the sysupgrade image after it is built and flash it.

4 Likes

That device apparently has 16MB flash storage, so the partion table does seem like it's not using all the space.

However, as @eginnc noted, you may be able to achieve your goals by including the additional packages in the image (using the image builder). Likewise, you can remove packages you're not using via the same image builder process...

And of course, you could opt for extroot since your device does have USB ports... personally, I'd opt for that if you can't fit everything per the above -- it is the option with essentially zero risk (messing with the partition table could be problematic if you accidentally wipe out the ART data (factory calibration) and/or you may always need to build customized images based on some modified code to leverage a different partition layout.

2 Likes

16 MB flash, but with an OEM partitioning for dual-firmware (OpenWrt only appears to use the first slot), so you end up with a maximum image size of 7936 KB, which is not a lot.

/tmp/ is tmpfs (== RAM backed), it's not usable storage and will go away after rebooting.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.