What's new

JFFS not mounting / read-only error

  • 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!

Soulcage

Occasional Visitor
May be a silly question, but research and fiddling for hours has turned up nothing helpful. RT-AC66U on 246 and I'm unable to get JFFS mounted. I've tried reverting to stock firmware, restoring to factory settings, reloading asuswrt-merlin and of course enabling JFFS and formatting on reboot multiple times. I've even tried the multiple reboot trick. No matter what, JFFS doesn't mount and stays read-only. Any other helpful pointers?

Many thanks.
 
May be a silly question, but research and fiddling for hours has turned up nothing helpful. RT-AC66U on 246 and I'm unable to get JFFS mounted. I've tried reverting to stock firmware, restoring to factory settings, reloading asuswrt-merlin and of course enabling JFFS and formatting on reboot multiple times. I've even tried the multiple reboot trick. No matter what, JFFS doesn't mount and stays read-only. Any other helpful pointers?

Many thanks.

First time you mount it, you also need to format it. Check the Format option under the Enable option, then reboot. You might need to reboot twice (once to format, and once to mount the formatted partition).

Once properly mounted, you should see both the scripts and config directories appear under /jffs, and they will be writable.
 
Thank you RMerlin. Yes, I've tried that many, many times. The restart definitely seems longer once I have the format option selected. Regardless, no luck.

BTW: I've also tried disabling JFFS, rebooting, then reselecting both radio buttons and rebooting. Still no JFFS.
 
Last edited:
Thank you RMerlin. Yes, I've tried that many, many times. The restart definitely seems longer once I have the format option selected. Regardless, no luck.

BTW: I've also tried disabling JFFS, rebooting, then reselecting both radio buttons and rebooting. Still no JFFS.

Make sure you do reboot a second time after that longer boot where it got formatted. Sometimes it won't mount it at the same time it formats it. Also look into dmesg for any error related to jffs. Over telnet, simply run:

dmesg | more
 
I've done the second reboot many times, and just tried the entire process again, with a third reboot thrown in for fun. I am using the reboot button at the top of the user interface, if that makes a difference at all.

No JFFS and only a message in dmesg about JFFS2. However, there are a few messages about bad blocks, could this be the root cause?

NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
nand_read_bbt: Bad block at 0x000a0000
nand_read_bbt: Bad block at 0x00c00000
nand_read_bbt: Bad block at 0x021a0000
nand_read_bbt: Bad block at 0x02be0000
nand_read_bbt: Bad block at 0x034a0000
nand_read_bbt: Bad block at 0x04960000
nand_read_bbt: Bad block at 0x04ae0000
Creating 3 MTD partitions on "brcmnand":
0x00000000-0x02000000 : "trx"
0x02000000-0x04000000 : "jffs2"
0x04000000-0x07f00000 : "brcmnand"
dev_nvram_init: _nvram_init
 
Update: I have a second RT-AC66U that was unopened, intended to be a bridge once I got the first one working as the primary router. I decided to try updating the firmware and enabling JFFS, and guess what, it worked!

I used the same exact procedure as the previous router. I also see the same bad blocks messages in dmesg.

Perhaps there is something in flash that needs to be completely wiped out on the previous unit before JFFS can be successfully enabled?

Thanks again.

EDIT: I went back and retried the procedure on the first router and no luck.
 
Last edited:
There's a good chance it's indeed related to the bad blocks. My own AC66U would report one or two bad blocks as well, and I had problems getting it to format the whole 96 MB when I was implementing JFFS into the AC66U kernel driver. I suspect that the mtd-erase function has trouble handling bad blocks properly (despite the fact the mtd driver does have provision for a bad block list as you can see), so I'm afraid I don't have any solution for you for now, sorry.
 
Seems it may be those pesky bad blocks. I see the following in dmesg, which I assume is the mtd-erase trying to prep for the jffs partition:

nand_erase: attempt to erase a bad block at page 0x00004340

Interestingly, my bad block table doesn't include that address:

Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
nand_read_bbt: Bad block at 0x000a0000
nand_read_bbt: Bad block at 0x00c00000
nand_read_bbt: Bad block at 0x021a0000
nand_read_bbt: Bad block at 0x02be0000
nand_read_bbt: Bad block at 0x034a0000
nand_read_bbt: Bad block at 0x04960000
nand_read_bbt: Bad block at 0x04ae0000

Any way to add to the bad block table?
 
I'm afraid I don't have any real solutions for you guys, sorry...

You could try manually erasing it over telnet, just to see if perhaps that would work better:

mtd-erase -d jffs
 
Totally understand - thanks for the ongoing support. I tried your suggestion earlier today and received the following:

mtd-erase -d jffs
Error erasing MTD

Although I'm not sure the syntax is correct. If I type

mtd-erase -d gobledygoock

I get the same message:

Error erasing MTD

Anything else to try?
 
Totally understand - thanks for the ongoing support. I tried your suggestion earlier today and received the following:

mtd-erase -d jffs
Error erasing MTD

Although I'm not sure the syntax is correct. If I type

mtd-erase -d gobledygoock

I get the same message:

Error erasing MTD

Anything else to try?

Sorry, typo on my part:

mtd-erase -d jffs2
 
And now we are getting somewhere:

Erasing 0x0 - 0x1ffff
Erasing 0x20000 - 0x3ffff
Erasing 0x40000 - 0x5ffff
Erasing 0x60000 - 0x7ffff
Erasing 0x80000 - 0x9ffff
Erasing 0xa0000 - 0xbffff
Erasing 0xc0000 - 0xdffff
Erasing 0xe0000 - 0xfffff
Erasing 0x100000 - 0x11ffff
Erasing 0x120000 - 0x13ffff
Erasing 0x140000 - 0x15ffff
Erasing 0x160000 - 0x17ffff
Erasing 0x180000 - 0x19ffff
Erasing 0x1a0000 - 0x1bffff
MEMERASE: Input/output error

Error erasing MTD

Although I assume that somewhere is a dead-end . . .
 
What happens if you insist 2-3 times?
 
Tried that, receive the same break point each time. Is there a way to use mtd-unlock and mtd-write to put the files down without an mtd-erase? Or a way to use a different section of flash?
 
Tried that, receive the same break point each time. Is there a way to use mtd-unlock and mtd-write to put the files down without an mtd-erase? Or a way to use a different section of flash?

Nothing that can be done by a end-user, no. The partition table is built by the kernel at boot time.

The problem isn't about unlocking, it's about writing the filesystem header. I wouldn't trust a partition which knowingly contains bad sectors.

It would probably take an expert kernel programmer to work around this issue, possibly properly handling bad blocks - something I'm not unfortunately.
 
Thanks again for all your help RMerlin. You mentioned that initially you had problems formatting the partition, how did you work around it?

Looks like my answer is an RMA.
 
Thanks again for all your help RMerlin. You mentioned that initially you had problems formatting the partition, how did you work around it?

Looks like my answer is an RMA.

I was initially trying to use the whole unusued flash space (all 96 MB). I reduced it to 32 Mb thinking that my problems at the time were caused by the size, and also because I felt that anything bigger than 32 MB made little sense.

I'm not sure you will be able to RMA it based on your issue. It seems that bad blocks are something normal in this type of flash, seeing that we're three persons whose router are exhibiting bad blocks, and that there is provision in the kernel to handle those bad blocks. The JFFS code was added by me, so it's possible that while the firmware part can properly use the bad block tables, the JFFS partition cannot.
 
Facing same issue

I'm also facing same issue with my RT-AC66U, followed all suggestions from this thread and seeing exact same problem as others.
 
Just FYI, I was facing the same issue and quite sure that I had a defective unit, but after quite a few reboots (definitely more than two!) and combinations of enabling/disabling the JFFS partition/format and hitting the apply button, it finally worked!
 

Similar 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