Partitions on TP-Link WDR4300v1 with OpenWrt 25.12.1

I could do with some advice from someone knowledgeable about overlay partitions. It seems weird that /tmp gets a 59M partition, but the overlay root partition gets 640K.

Part of what is confusing me (I'm easily confused) is that I did a factory reset on a second WDR4300. When it came up pristine, I configured it as usual, all working fine. Then on next reboot, it lost all its configuration. I was only able to determine this from failsafe mode -> mount_root

What I think is happening:

  • the initial factory reset is fine, and the partitions are mounted correctly (with the relatively ample MBs disk space I would expect in overlay root)
  • I'm able to configure the system as expected on a fresh install, writing the config to the mounted partition
  • on reboot, the overlay partition with all the custom configuration is not remounted, leaving only the much smaller 640K partition and read-only config - system is bootable, but devoid of meaningful configuration

Is anyone else seeing this, or am I just doing something dumb? I'm not excluding operator error here.

Details of a 'working' WDR4300 below:

root@foo:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 4.8M      4.8M         0 100% /rom
tmpfs                    59.0M    256.0K     58.7M   0% /tmp
/dev/mtdblock4          640.0K    252.0K    388.0K  39% /overlay
overlayfs:/overlay      640.0K    252.0K    388.0K  39% /
tmpfs                   512.0K         0    512.0K   0% /dev

root@foo:/tmp# mount
/dev/root on /rom type squashfs (ro,relatime,errors=continue)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock4 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,noatime)
bpffs on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)

Is it that the partition layout in the wiki is out-of-date?

Or is this as intended?

Any advice gratefully received.

/tmp is RAM, not stored on flash.

Over filling /overlay will make device not save and load config properly.

With 8MB flash, 640kb free, posts flash, doesn't sound very unlikely to me.

Thank you - so to confirm I've understood: the partition layout looks right to you, and the problem is likely due to me inadvertently filling the 640K overlay partition during initial config?

Config shouldn't fill it that much, additional packages would.

Run a cat /proc/mtdto see the layout of the flash.

2 Likes

Thanks - I'll do another factory reset and leave it as vanilla as possible to see if the config survives a reboot this time. I appreciate the help.

It's a 8 MB (minus 192 KB for bootloader and ART) flash device, there simply isn't much space left.

2 Likes

It's another device where the 864 warning should be added.

1 Like

I'm back up and running again. Your diagnosis was spot on. Thanks @frollic and @slh

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