Why does /rom still show the original file after you edit it? Read the mount table to identify the firmware image, the merged view and temporary storage.
Identify the layout from the mount points
On a device with a SquashFS image, /rom usually holds the read-only firmware contents. Opening the same path from the root directory shows the version in the writable layer when one exists. Depending on the image, writable storage may use JFFS2, UBIFS, F2FS or ext4. With extroot, also check that the external disk is mounted.
Does a writable OpenWrt root directory always mean overlay is in use?
Log in over wired management and record the device, filesystem and ro/rw flags for the root and temporary directories. Running df on a directory named /overlay can return the root filesystem. Check the mount table before treating it as a separate mount for capacity accounting.
awk '$2=="/" || $2=="/rom" || $2=="/overlay" || $2=="/tmp" {print $1,$2,$3,$4}' /proc/mounts
df -k / /tmp
[ -d /overlay ] && df -k /overlay

If /rom is read-only SquashFS and the root uses overlayfs, deleting a built-in file normally hides it in the upper layer without freeing space in the read-only image. Our 25.12.6 x86/64 guest mounted /dev/root directly as ext4 with rw; /tmp used tmpfs. On that layout inspect free space on ext4. Read Available again on the same mount after an operation. A reboot clears /tmp, so keep configuration backups on another device.
Which home network services can you restore in ten minutes on a spare router?
How can you tell whether a file will survive a reboot?
On a spare device, choose two unused names and create one empty test file under /etc and another under /tmp. Use a wired connection and confirm that you can log back in before rebooting. If the /etc file survives and the /tmp file disappears, compare this with the mount table to identify persistent and temporary storage. On a read-only /rom, you should not find the new /etc file in the firmware image. Delete the files you created when you finish.
Comments