Topic: Backfire (10.03, r21620), WRT54GL, readonly filesystem

Hi,

I have got a problem with a fresh installed Backfire on my WRT54GL-Box. I tried to install three times and every time the same thing happend:


Installation and configuration is no problem, everything seems to work as expected. Then, when i unplug the Box and restart it the next day, i cant write to the filesystem anymore:

===========================================================
PBook:~ wolfgang$ ssh root@linksys_1_wan


BusyBox v1.15.3 (2010-05-30 12:28:22 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
Backfire (10.03, r21620) --------------------------
  * 1/3 shot Kahlua    In a shot glass, layer Kahlua
  * 1/3 shot Bailey's  on the bottom, then Bailey's,
  * 1/3 shot Vodka     then Vodka.
---------------------------------------------------
root@OpenWrt:~# cat /etc/hosts > bin/test
-ash: can't create bin/test: Read-only file system
root@OpenWrt:~#
root@OpenWrt:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 2240      2240         0 100% /rom
tmpfs                     7168        44      7124   1% /tmp
/dev/mtdblock/4           1024       676       348  66% /overlay
mini_fo:/overlay          2240      2240         0 100% /
root@OpenWrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro)
none on /dev type devfs (rw)
none on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock/4 on /overlay type jffs2 (rw)
mini_fo:/overlay on / type mini_fo (rw)
root@OpenWrt:~#
==========================================================

Maybe someone can interpret, what logread says:

root@OpenWrt:~# logread
Jan  1 00:00:13 OpenWrt syslog.info syslogd started: BusyBox v1.15.3
Jan  1 00:00:13 OpenWrt user.notice kernel: klogd started: BusyBox v1.15.3 (2010-05-30 12:28:22 CEST)
Jan  1 00:00:13 OpenWrt user.warn kernel: CPU revision is: 00029007
Jan  1 00:00:13 OpenWrt user.warn kernel: Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Jan  1 00:00:13 OpenWrt user.warn kernel: Primary data cache 4kB, 2-way, linesize 16 bytes.
Jan  1 00:00:13 OpenWrt user.warn kernel: Linux version 2.4.37.9 (wolfgang@ubuntu) (gcc version 3.4.6 (OpenWrt-2.0)) #12 Mon May 31 17:59:26 CEST 2010
Jan  1 00:00:13 OpenWrt user.warn kernel: Determined physical RAM map:
Jan  1 00:00:13 OpenWrt user.warn kernel:  memory: 01000000 @ 00000000 (usable)
Jan  1 00:00:13 OpenWrt user.warn kernel: On node 0 totalpages: 4096
Jan  1 00:00:13 OpenWrt user.warn kernel: zone(0): 4096 pages.
Jan  1 00:00:13 OpenWrt user.warn kernel: zone(1): 0 pages.
Jan  1 00:00:13 OpenWrt user.warn kernel: zone(2): 0 pages.
Jan  1 00:00:13 OpenWrt user.info kernel: Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Jan  1 00:00:13 OpenWrt user.info kernel: Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Jan  1 00:00:13 OpenWrt user.warn kernel: Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Jan  1 00:00:13 OpenWrt user.warn kernel: Checking for 'wait' instruction...  unavailable.
Jan  1 00:00:13 OpenWrt user.warn kernel: POSIX conformance testing by UNIFIX
Jan  1 00:00:13 OpenWrt user.warn kernel: PCI: Disabled
Jan  1 00:00:13 OpenWrt user.warn kernel: PCI: Fixing up bus 0
Jan  1 00:00:13 OpenWrt user.info kernel: Linux NET4.0 for Linux 2.4
Jan  1 00:00:13 OpenWrt user.info kernel: Based upon Swansea University Computer Society NET3.039
Jan  1 00:00:13 OpenWrt user.warn kernel: Initializing RT netlink socket
Jan  1 00:00:13 OpenWrt user.warn kernel: Starting kswapd
Jan  1 00:00:16 OpenWrt user.info kernel: b44: eth0: Link is up at 100 Mbps, full duplex.
Jan  1 00:00:16 OpenWrt user.info kernel: b44: eth0: Flow control is off for TX and off for RX.
Jan  1 00:00:18 OpenWrt user.debug kernel: eth0.0: add 01:00:5e:00:00:01 mcast address to master interface
Jan  1 00:00:18 OpenWrt user.debug kernel: eth0.1: add 01:00:5e:00:00:01 mcast address to master interface
Jan  1 00:00:18 OpenWrt user.info kernel: eth0.0: dev_set_promiscuity(master, 1)
Jan  1 00:00:18 OpenWrt user.info kernel: device eth0 entered promiscuous mode
Jan  1 00:00:18 OpenWrt user.info kernel: device eth0.0 entered promiscuous mode
Jan  1 00:00:18 OpenWrt user.info kernel: br-lan: port 1(eth0.0) entering learning state
Jan  1 00:00:18 OpenWrt user.info kernel: br-lan: port 1(eth0.0) entering forwarding state
Jan  1 00:00:18 OpenWrt user.info kernel: br-lan: topology change detected, propagating
Jan  1 00:00:20 OpenWrt user.debug kernel: PCI: Setting latency timer of device 00:01.0 to 64
Jan  1 00:00:20 OpenWrt user.emerg kernel: PCI/DMA
Jan  1 00:00:20 OpenWrt user.emerg kernel: wl0: wlc_attach: chiprev 1 coreunit 0 corerev 7 cccap 0x4876a maccap 0x0 band 2.4G, phy_type 2 phy_rev 2 ana_rev 2
Jan  1 00:00:20 OpenWrt user.warn kernel: wl0: Broadcom BCM4320 802.11 Wireless Controller 4.150.10.5
Jan  1 00:00:21 OpenWrt user.info sysinit: Warning: loading wl will taint the kernel: non-GPL license - Proprietary
Jan  1 00:00:21 OpenWrt user.info sysinit:   See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Jan  1 00:00:21 OpenWrt user.warn kernel: ip_tables: (C) 2000-2002 Netfilter core team
Jan  1 00:00:23 OpenWrt user.warn kernel: ip_conntrack version 2.1 (5953 buckets, 5953 max) - 336 bytes per conntrack
Jan  1 00:00:26 OpenWrt user.notice rdate: Failed to sync with ptbtime1.ptb.de
Jan  1 00:00:26 OpenWrt user.notice rdate: Failed to sync with ptbtime1.ptb.de
Jan  1 00:00:26 OpenWrt user.notice rdate: Failed to sync with ptbtime1.ptb.de
Jan  1 00:00:28 OpenWrt user.info kernel: device wl0 entered promiscuous mode
Jan  1 00:00:28 OpenWrt user.info kernel: br-lan: port 2(wl0) entering learning state
Jan  1 00:00:28 OpenWrt user.info kernel: br-lan: port 2(wl0) entering forwarding state
Jan  1 00:00:28 OpenWrt user.info kernel: br-lan: topology change detected, propagating
Jan  1 00:00:29 OpenWrt user.info sysinit: Loading defaults
Jan  1 00:00:31 OpenWrt user.info sysinit: Loading synflood protection
Jan  1 00:00:31 OpenWrt user.info sysinit: Adding custom chains
Jan  1 00:00:33 OpenWrt user.info sysinit: Loading zones
Jan  1 00:00:34 OpenWrt user.notice rdate: Failed to sync with ac-ntp0.net.cmu.edu
Jan  1 00:00:34 OpenWrt user.notice rdate: Failed to sync with ac-ntp0.net.cmu.edu
Jan  1 00:00:34 OpenWrt user.info sysinit: Loading forwarding
Jan  1 00:00:34 OpenWrt user.info sysinit: Loading redirects
Jan  1 00:00:35 OpenWrt user.info sysinit: Loading rules
Jan  1 00:00:35 OpenWrt user.notice rdate: Failed to sync with ac-ntp0.net.cmu.edu
Jan  1 00:00:35 OpenWrt user.info sysinit: Loading includes
Jan  1 00:00:35 OpenWrt user.info sysinit: Loading zone defaults
Jan  1 00:00:36 OpenWrt user.notice root: adding lan (br-lan) to firewall zone lan
Jan  1 00:00:37 OpenWrt user.notice root: adding wan (eth0.1) to firewall zone wan
Jan  1 00:00:40 OpenWrt auth.info sshd[752]: Server listening on 0.0.0.0 port 22.
Jan  1 00:00:44 OpenWrt daemon.info dnsmasq[773]: started, version 2.52 cachesize 150
Jan  1 00:00:44 OpenWrt daemon.info dnsmasq[773]: compile time options: IPv6 GNU-getopt no-DBus no-I18N DHCP TFTP
Jan  1 00:00:44 OpenWrt daemon.info dnsmasq-dhcp[773]: DHCP, IP range 192.168.27.100 -- 192.168.27.250, lease time 12h
Jan  1 00:00:44 OpenWrt daemon.info dnsmasq[773]: using local addresses only for domain lan
Jan  1 00:00:44 OpenWrt daemon.info dnsmasq[773]: reading /tmp/resolv.conf.auto
Jan  1 00:00:44 OpenWrt daemon.info dnsmasq[773]: using nameserver 192.168.1.3#53
Jan  1 00:00:44 OpenWrt daemon.info dnsmasq[773]: using local addresses only for domain lan
Jan  1 00:00:44 OpenWrt daemon.info dnsmasq[773]: read /etc/hosts - 1 addresses
Jan  1 00:00:44 OpenWrt daemon.info dnsmasq-dhcp[773]: read /etc/ethers - 0 addresses
Jan  1 00:00:44 OpenWrt user.notice kernel: Write of 68 bytes at 0x0009c238 failed. returned -30, retlen 0
Jan  1 00:00:44 OpenWrt user.notice kernel: Not marking the space at 0x0009c238 as dirty because the flash driver returned retlen zero
Jan  1 00:00:44 OpenWrt user.info sysinit: chmod: /etc/stunnel/stunnel.pem: Read-only file system
Jan  1 00:00:45 OpenWrt daemon.notice stunnel: LOG5[777:0]: Reading configuration from file /etc/stunnel/stunnel.conf
Jan  1 00:00:45 OpenWrt daemon.notice stunnel: LOG5[777:0]: Configuration successful
Jan  1 00:00:45 OpenWrt daemon.notice stunnel: LOG5[777:0]: No limit detected for the number of clients
Jan  1 00:00:45 OpenWrt daemon.notice stunnel: LOG5[780:0]: stunnel 4.33 on mipsel-openwrt-linux-gnu with OpenSSL 0.9.8m 25 Feb 2010
Jan  1 00:00:45 OpenWrt daemon.notice stunnel: LOG5[780:0]: Threading:FORK SSL:ENGINE Sockets:POLL,IPv4 Auth:LIBWRAP
Jan  1 00:09:15 OpenWrt daemon.warn dnsmasq-dhcp[773]: no address range available for DHCP request via eth0.1
Jan  1 00:09:29 OpenWrt auth.info sshd[786]: WARNING: /etc/ssh/moduli does not exist, using fixed modulus
Jan  1 00:09:30 OpenWrt auth.info sshd[786]: Accepted publickey for root from 192.168.1.187 port 62897 ssh2
Jan  1 00:10:16 OpenWrt user.notice kernel: Write of 68 bytes at 0x0009c238 failed. returned -30, retlen 0
Jan  1 00:10:16 OpenWrt user.notice kernel: Not marking the space at 0x0009c238 as dirty because the flash driver returned retlen zero
Jan  1 00:10:16 OpenWrt user.crit kernel: mini_fo: create_sto_file: ERROR creating sto file.
Jan  1 00:12:05 OpenWrt auth.info sshd[786]: syslogin_perform_logout: logout() returned an error
Jan  1 00:12:06 OpenWrt auth.info sshd[799]: WARNING: /etc/ssh/moduli does not exist, using fixed modulus
Jan  1 00:12:07 OpenWrt auth.info sshd[799]: Accepted publickey for root from 192.168.1.187 port 62900 ssh2
Jan  1 00:14:44 OpenWrt user.notice kernel: Write of 68 bytes at 0x0009c238 failed. returned -30, retlen 0
Jan  1 00:14:44 OpenWrt user.notice kernel: Not marking the space at 0x0009c238 as dirty because the flash driver returned retlen zero
Jan  1 00:14:44 OpenWrt user.crit kernel: mini_fo: create_sto_file: ERROR creating sto file.
root@OpenWrt:~#


Thank you for any hint
Wolfgang

Re: Backfire (10.03, r21620), WRT54GL, readonly filesystem

Hi,

Very same problem here with a WRT54G v3.1.
Any clue?

Thanks in advance.

Re: Backfire (10.03, r21620), WRT54GL, readonly filesystem

I just downgraded to kamikaze 8.09 and did not find this behaviour. So it seems to be a problem of backfire.

Wolfgang

Re: Backfire (10.03, r21620), WRT54GL, readonly filesystem

Wolfgang wrote:

I just downgraded to kamikaze 8.09 and did not find this behaviour. So it seems to be a problem of backfire.

Sure it is: I've 3 WRT54G running kamikaze.

5 (edited by pini 2010-06-06 21:31:19)

Re: Backfire (10.03, r21620), WRT54GL, readonly filesystem

Found a workaround in https://forum.openwrt.org/viewtopic.php?id=10717
Running

mtd unlock rootfs_data

makes the device usable again.

Edit: opened ticket #7437.

Re: Backfire (10.03, r21620), WRT54GL, readonly filesystem

Thank you for this reply, pini.

I think i will give Backfire another try but i downgraded to kamikaze in the mean time. Can you tell me, if i have to do

mtd unlock rootfs_data

ervery time i unplug the box?

Wolfgang

Re: Backfire (10.03, r21620), WRT54GL, readonly filesystem

Yes, the unlock should be done at each cold reboot. It can easily be done automatically by an init script. For now I've modified the /etc/init.d/nvram script (first init script triggered at boot time) adding "mtd unlock rootfs_data" at the very beginning of its start() function.

I'm confident this bug will be fixed in 10.03.1.

Re: Backfire (10.03, r21620), WRT54GL, readonly filesystem

Hi pini,

I just installed Backfire again and inserted "mtd unlock rootfs_data" at the function you pointed me to. It seems to work as expected. A look at logread gives the following warning, showing the reason for the locked rootfs_data:

Jan  1 01:00:12 OpenWrt user.info kernel: Physically mapped flash: Filesystem type: squashfs, size=0x2289da
Jan  1 01:00:12 OpenWrt user.notice kernel: Creating 5 MTD partitions on "Physically mapped flash":
Jan  1 01:00:12 OpenWrt user.notice kernel: 0x00000000-0x00040000 : "cfe"
Jan  1 01:00:12 OpenWrt user.notice kernel: 0x00040000-0x003f0000 : "linux"
Jan  1 01:00:12 OpenWrt user.notice kernel: 0x000bb400-0x002f0000 : "rootfs"
Jan  1 01:00:12 OpenWrt user.warn kernel: mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
Jan  1 01:00:12 OpenWrt user.notice kernel: 0x003f0000-0x00400000 : "nvram"
Jan  1 01:00:12 OpenWrt user.notice kernel: 0x002f0000-0x003f0000 : "rootfs_data"

I am not sure, what it means, that "rootfs doesn't start on an erase block boundary" but that seems to be the reason for the blocked rootfs_data.

Thank you again for your help.
Wolfgang

Re: Backfire (10.03, r21620), WRT54GL, readonly filesystem

Wolfgang wrote:

I just installed Backfire again and inserted "mtd unlock rootfs_data" at the function you pointed me to. It seems to work as expected. A look at logread gives the following warning, showing the reason for the locked rootfs_data:

Jan  1 01:00:12 OpenWrt user.info kernel: Physically mapped flash: Filesystem type: squashfs, size=0x2289da
Jan  1 01:00:12 OpenWrt user.notice kernel: Creating 5 MTD partitions on "Physically mapped flash":
Jan  1 01:00:12 OpenWrt user.notice kernel: 0x00000000-0x00040000 : "cfe"
Jan  1 01:00:12 OpenWrt user.notice kernel: 0x00040000-0x003f0000 : "linux"
Jan  1 01:00:12 OpenWrt user.notice kernel: 0x000bb400-0x002f0000 : "rootfs"
Jan  1 01:00:12 OpenWrt user.warn kernel: mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
Jan  1 01:00:12 OpenWrt user.notice kernel: 0x003f0000-0x00400000 : "nvram"
Jan  1 01:00:12 OpenWrt user.notice kernel: 0x002f0000-0x003f0000 : "rootfs_data"

I am not sure, what it means, that "rootfs doesn't start on an erase block boundary" but that seems to be the reason for the blocked rootfs_data.

No, this error isn't related to the bug: https://forum.openwrt.org/viewtopic.php?pid=48335#p48335