Read-only file system

root@OpenWrt:/etc# touch passwod
touch: passwod: Read-only file system

how to fix that?

Let's get more information:

ubus call system board
df -h
mount
1 Like
root@OpenWrt:/etc# ubus call system board
{
        "kernel": "4.9.243",
        "hostname": "OpenWrt",
        "system": "Qualcomm Atheros QCA9533 ver 2 rev 0",
        "model": "TP-LINK TL-WR840N v2",
        "board_name": "tl-wr840n-v2",
        "release": {
                "distribution": "OpenWrt",
                "version": "18.06.9",
                "revision": "r8077-7cbbab7246",
                "target": "ar71xx\/tiny",
                "description": "OpenWrt 18.06.9 r8077-7cbbab7246"
        }
}
root@OpenWrt:/etc# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    13.6M      1.0M     12.6M   8% /tmp
/dev/mtdblock3          320.0K    256.0K     64.0K  80% /overlay
overlayfs:/overlay      320.0K    256.0K     64.0K  80% /
tmpfs                   512.0K         0    512.0K   0% /dev

root@OpenWrt:/etc# mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)

This is an old, EOL, and unsupported version of OpenWrt.

This is a 4/32 device. You're simply running out of space.

My guess is that this is the limit at which point the system goes into RO mode (because of the size of the erase blocks).

You can use failsafe mode to erase any additional files and/or reset to defaults.

But fundamentally, this device is just underresourced and needs to be replaced.

3 Likes