How to expand overlayfs (rootfs_data) using menuconfig?

Hi, my device has 16MB SPI FLASH and i am trying to install some packages but overlayfs is not sufficient in here. I know there is available space on the flash but i cannot use
so how can i increase overlayfs using menuconfig or any other method
thanks in advance

~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                10.0M     10.0M         0 100% /rom
tmpfs                    59.8M    148.0K     59.7M   0% /tmp
/dev/mtdblock6            3.7M    588.0K      3.1M  16% /overlay
**overlayfs:/overlay**        3.7M    588.0K      3.1M  16% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock7          576.0K    228.0K    348.0K  40% /log
~# cat /etc/mtab 
/dev/root /rom squashfs ro,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0
/dev/mtdblock6 /overlay jffs2 rw,sync,noatime 0 0
overlayfs:/overlay / overlay rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,size=512k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600,ptmxmode=000 0 0
debugfs /sys/kernel/debug debugfs rw,noatime 0 0
none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,noatime,mode=700 0 0
/dev/mtdblock7 /log jffs2 rw,relatime 0 0

where ?

image appears to be 10M, another ~4MB is allocated to /overlay

i removed many packages on the device but /dev/root still remains 10MB
i did not understand this

removing packages (on a running device) won't actually free any flash space.

if you know there are unneeded packages, use the online image builder to create a custom image, with the packages removed.

1 Like