What's new

jffs problems - is my flash memory going bad ? ?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

rb64

New Around Here
I have a TM-AC1900 (aka tmobile branded RT-AC68U) running 376.47,
and am wondering if its flash memory is going bad. JFFS was working fine
for a few weeks. Then after a reboot yesterday, jffs no longer
gets mounted and I see these errors in dmesg:
(also attempting to manually mount yields same errors in syslog)

Code:
mtd->read(0x1fc08 bytes from 0x2c603f8) returned ECC error
Old JFFS2 bitmask found at 0x02c74ae0
You cannot use older JFFS2 filesystems with newer kernels
mtd->read(0x400 bytes from 0x2c80000) returned ECC error
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02c80000: 0x2cc4 instead
 (more jffs2_scan_eraseblock errors snipped...)
Further such events for this erase block will not be printed
mtd->read(0x1fc08 bytes from 0x2c803f8) returned ECC error
mtd->read(0x400 bytes from 0x2ca0000) returned ECC error
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02ca0000: 0x7a4b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x02ca0004: 0x8bd7 instead
 (more jffs2_scan_eraseblock errors snipped...)
Further such events for this erase block will not be printed
mtd->read(0x1fc08 bytes from 0x2ca03f8) returned ECC error
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 154, bad_blocks 0, c->nr_blocks 758

So far, I have tried
1) checking the Administration->System->Format JFFS partition at next boot (and rebooting)
and have done this several times.
2) tried
nvram unset jffs2_size
nvram set jffs2_format=1
nvram set jffs2_on=1
nvram commit
reboot
3) /sbin/mtd-erase2 jffs2 (as well as "mtd-erase2 jffs", "mtd-erase2 /dev/mtd4")
all yield command-line syntax error usage: mtd-erase2 [device]

Can anyone offer any other suggestions to try ?
 
How have you been using the flash memory?
 
How have you been using the flash memory?

I don't think i've been abusing the nand. I write to it once a day, as well as the usual syslog stuff (log entries a few times a day).

My jffs partition (mtd4) is currently 99MB. I wonder if it is possible to make
it smaller (in hopes of avoiding flash memory errors). All I need is about 10MB.
 
My jffs partition (mtd4) is currently 99MB. I wonder if it is possible to make it smaller (in hopes of avoiding flash memory errors). All I need is about 10MB.

That would require making changes to the kernel source code to modify the partition table.
 
That would require making changes to the kernel source code to modify the partition table.

Yikes. I'm gonna exhaust any other options before mucking with kernel src.

Concerning /sbin/mtd-erase2 (arm version):
Code:
 /sbin/mtd-erase2 jffs2 (as well as "mtd-erase2 jffs", "mtd-erase2 /dev/mtd4", "mtd-erase2 mtd4", "mtd-erase2 /dev/mtdblock4")
all yield command-line syntax error [B]usage: mtd-erase2 [device][/B]

I'm curious if :
  • I'm supplying the wrong command line argument
  • Faulty nand causing the syntax error
  • or is mtd-erase2 broken
 
Just for verification....what does

cat /proc/mtd

show

Here you go. Lemme know if u see anything screwy.

dev: size erasesize name
mtd0: 00080000 00020000 "boot"
mtd1: 00180000 00020000 "nvram"
mtd2: 01e00000 00020000 "linux"
mtd3: 01c67730 00020000 "rootfs"
mtd4: 05ec0000 00020000 "brcmnand"
mtd5: 00140000 00020000 "asus"
 
Here you go. Lemme know if u see anything screwy.

dev: size erasesize name
mtd0: 00080000 00020000 "boot"
mtd1: 00180000 00020000 "nvram"
mtd2: 01e00000 00020000 "linux"
mtd3: 01c67730 00020000 "rootfs"
mtd4: 05ec0000 00020000 "brcmnand"
mtd5: 00140000 00020000 "asus"

Yes, I do.....here's the output from my system for comparison (AC68U)....

dev: size erasesize name
mtd0: 00080000 00020000 "boot"
mtd1: 00180000 00020000 "nvram"
mtd2: 01e00000 00020000 "linux"
mtd3: 01c599a0 00020000 "rootfs"
mtd4: 06000000 00020000 "brcmnand"
mtd5: 02000000 00020000 "jffs2"

So, you don't have a 'jffs2' partition....

EDIT: See next post by Merlin for next step
 
Last edited:
Yes, I do.....here's the output from my system for comparison (AC68U)....

dev: size erasesize name
mtd0: 00080000 00020000 "boot"
mtd1: 00180000 00020000 "nvram"
mtd2: 01e00000 00020000 "linux"
mtd3: 01c599a0 00020000 "rootfs"
mtd4: 06000000 00020000 "brcmnand"
mtd5: 02000000 00020000 "jffs2"

So, you don't have a 'jffs2' partition....

you might try

mtd-erase2 asus

followed by a factory reset and see if that helps.

On recent versions of my firmware as well as stock RT-xxx firmware, the JFFS partition is brcmnand. I changed from a custom jffs2 partition to using brcmnand on the RT-AC66 and newer models so to be in-sync with Asus. Older firmwares, as well as the RT-N66 and RT-N16 use jffs2.

On the stock TM-1900 firmware it might be different. During development I saw Asus do a lot of changes to how they were using the jffs2/brcmnand/asus partition (and tinkering with that asus partition is what actually caused me to brick my initial RT-AC87U development sample), and I don't remember what was the final setup they went with.

The best way to know for sure is to use the "mount" command to see which device is mounted on /jffs.

Code:
admin@Stargate87:/tmp/home/root# mount | grep jffs
/dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
 
On recent versions of my firmware as well as stock RT-xxx firmware, the JFFS partition is brcmnand. I changed from a custom jffs2 partition to using brcmnand on the RT-AC66 and newer models so to be in-sync with Asus. Older firmwares, as well as the RT-N66 and RT-N16 use jffs2.

On the stock TM-1900 firmware it might be different. During development I saw Asus do a lot of changes to how they were using the jffs2/brcmnand/asus partition (and tinkering with that asus partition is what actually caused me to brick my initial RT-AC87U development sample), and I don't remember what was the final setup they went with.

The best way to know for sure is to use the "mount" command to see which device is mounted on /jffs.

Code:
admin@Stargate87:/tmp/home/root# mount | grep jffs
/dev/mtdblock4 on /jffs type jffs2 (rw,noatime)

Although I no longer can mount it, I am 100% certain that
my jffs partition was mtdblock4 (size 99MB). My asus partition
is only 1MB.

RMerl/John, does /sbin/mtd-erase2 (arm version) return
anything other than:
usage: mtd-erase2 [device]
If yes, then mine is broken (or something
in my tmobile CFE is causing the error) .
 
Although I no longer can mount it, I am 100% certain that
my jffs partition was mtdblock4 (size 99MB). My asus partition
is only 1MB.

RMerl/John, does /sbin/mtd-erase2 (arm version) return
anything other than:
usage: mtd-erase2 [device]
If yes, then mine is broken (or something
in my tmobile CFE is causing the error) .

The correct syntax in your case would be:

Code:
mtd-erase2 brcmnand

Since that's the name of your mtd4 partition.
 
The correct syntax in your case would be:

Code:
mtd-erase2 brcmnand

Since that's the name of your mtd4 partition.

I get same syntax error (thx for suggestion tho)

Code:
# /sbin/mtd-erase2 brcmnand
usage: mtd-erase2 [device]
 
After reading this forum having the same issue I looked at Merlin git code and saw that the mtd-erase2 was not updated with recent asus renaming jffs2 to brcmnand I've pulled a request to get this back in the rc.c code so you can do mtd-erase2 brcmnand to fix this
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top