OpenWrt Forum Archive

Topic: TP-Link W841N: Read-only filesystem after reboot (CC 15.05.1)

The content of this topic has been archived on 4 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I installed CHAOS CALMER (15.05.1, r48532) on my TP-LINK W841N(D) router v10.
Installation went smooth by choosing the .bin firmware image via "Upgrade Firmware" option of TP-Link's web ui. And it upgraded installed fine. I used router happily for a couple of days, after which I added a command to startup (to execute a shell script), and rebooted the router, and after reboot, filesystem has become read-only.

root@openWrt:~# touch test
touch: test: Read-only file system

here's the output of mount

root@openWrt:~# mount
rootfs on / type rootfs (rw)
/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)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)


Router still functions, and I can still ssh and all, but now I can not write any changes to the filesystem, thus cant change any settings nor add any extra files or remove existing ones for that matter. I tried searching and only relevant results I found were from 2005 where the fix was to `nvram unset  root_no_swap` or something like that. (And nvram - command not found).

Could someone please help.

Is it booting into to safe mode because the normal boot is failing after your change?

It is booting in normal mode as far as I can tell. Should anything be different in safe mode? Normal functionality isnt affected in general

Well safe mode is read-only, so I am just taking a stab in the dark. You can read about it here.

https://wiki.openwrt.org/doc/howto/generic.failsafe

You could look through the kernel and system logs in luci, or perhaps execute dmesg from the terminal.

No,It is not in safe mode. Running in normal mode, however filesystem is read-only.

The 'ro' access of SquashFS is intentional.

Be so kind to post the packages installed post-CC installation.

HINT: SquashFS and OpenWrt

I might be wrong but I thought problem is with overlay being 'ro'.

Only packages I installed are curl (and therefore libcurl) after CC installation. And I removed "ip6tables". Those are only changes to packages.

Any of the settings are not being saved due to system being read-only.

Post output of -

df -h

When I install more packages and there is no space left, my router turn to read only as well then I just reset it then in come to normal

chiakhoavang.vn wrote:

When I install more packages and there is no space left, my router turn to read only as well then I just reset it then in come to normal

Correct. This is documented behaviour.

root@openWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                  576.0K    508.0K     68.0K  88% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    14.0M      1.1M     12.8M   8% /tmp
/dev/mtdblock3          576.0K    508.0K     68.0K  88% /overlay
overlayfs:/overlay      576.0K    508.0K     68.0K  88% /
tmpfs                   512.0K         0    512.0K   0% /dev

--

There is space though. What do you mean by "reset it" ?

(Last edited by hrishirt on 18 May 2016, 19:01)

Out of space -

WR841ND v7 wrote:

Filesystem                Size      Used Available Use% Mounted on
rootfs                  640.0K    256.0K    384.0K  40% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    14.0M     80.0K     14.0M   1% /tmp
/dev/mtdblock3          640.0K    256.0K    384.0K  40% /overlay
overlayfs:/overlay      640.0K    256.0K    384.0K  40% /
tmpfs                   512.0K         0    512.0K   0% /dev

Either firstboot (AKA reset) and do not add / delete packages or Image Generator to include / exclude packages.

Thank you everyone. I ended up using Image Generator to build custom image with curl and without ip6tables etc. Turns out luci isn't included in default build, so had to install that too. (had one failed custom-build, and later successful one with luci)

# Reference: https://wiki.openwrt.org/doc/howto/obta … e.generate

Used following command

make image PROFILE=TLWR841 PACKAGES='curl libcurl luci -ip6tables -kmod-ip6tables -kmod-ipv6' FILE=files/

Where files/ contained my old config files. I still ended up copying my old config files by hand (for some reason weren't included in the build) but everything's dandy now.

Cheers

The discussion might have continued from here.