Netgear WAX206. How to resize overlayfs

Hello. I installed OpenWrt 23.05 on my Netgear WAX206. The volume of overlayfs is too small to install additional packages, but the volume of tmpfs is too big.

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 4.5M      4.5M         0 100% /rom
tmpfs                   245.4M    112.0K    245.3M   0% /tmp
/dev/ubi0_1              17.8M     11.8M      5.1M  70% /overlay
overlayfs:/overlay       17.8M     11.8M      5.1M  70% /
tmpfs                   512.0K         0    512.0K   0% /dev

What should I do to increase the volume of overlayfs to install more packages?

Welcome to the community!

Are you implying that you could gain space from /tmp?

If that's the case, you cannot. The /tmp is actually volatile memory based on the RAM chip (not flash) which does not survive power loss or reboots.

One option is to include these package in a custom build. That can be done here: https://firmware-selector.openwrt.org/?version=23.05.0&target=mediatek%2Fmt7622&id=netgear_wax206

See the section entitled: "Customize installed packages and/or first boot script".

You already have a lot of space available (by consumer router standards) - just curious, what are you installing?

2 Likes

the 206 is a dual flash device, whatever the chip capacity is (256MB I think), start by dividing it by 2.

2 Likes

wax206 very similar in hardware to Xiaomi AX6S, which has 128MB of flash - after OpenWRT installation, 90MB of 128MB is free. Why does the netgear wax206 only have 5MB out of 256MB? (I want to buy the same one, but the amount of available memory is surprising)

1 Like

I don't remember exectly, but not too much.
htop iperf3 openvpn
I wonder how much free space overlayfs has out of the box. But I think it's not normal for overlayfs to have 17.8MB out of the 256. But in the same time the tmpfs is 245.4MB.

I have the same question. For example, redmi ax6s has about 90MB free out of the 128MB.

Apples and bananas, /tmp is RAM.

Available flash space depends on flash layout, and Openwrt never modifies it, unless forced to.

1 Like

Or to phrase it a tad more explicitly.

The flash partitioning is in almost all cases decided by the OEM vendor at production time, OpenWrt tries very hard to function within the constraints set there. Re-partitioning is possible, but a pretty dangerous procedure, which makes reverting to the OEM firmware even more difficult (if not impossible). Also keep bootloader based recovery mechanisms in mind, which wouldn't know about your changed partitioning and would create real havoc with changed partitioning. Different vendors can make very different choices here.

These days, pretty much all vendors using NAND flash employ a dual-firmware setup, which halves the flash size right away, but many vendors also make rather unfortunate choices when it comes to partitioning. Their own firmware is usually rather limited in function and not extendable (and they'll never update the kernel version anyways), which means they don't need to retain large margins for future firmware growths - so they often won't, while at the same time 'wasting' considerable space for special vendor specific partitions or even reserved (~unused) space. With NAND, you also need to reserve a percentage of flash for (required) error correction and wear leveling techniques.

4 Likes

Are you able to install one package, luci-app-attendedsysupgrade? If so, then you can bypass (mostly) the use of the flash overlay to install the packages by using its "Configuration -> Advanced Mode" option, building and installing an image with the desired packages pre-installed. This avoids use of the overlay partition and just puts the new packages in the rom partition...

1 Like