What's new

Want to add a folder in /jffs/ but it's in read only (Need JFFS expert)

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

What router model? What firmware?
 
Try rebooting it to see if the partition mounts properly. If it still fails, enable the format jffs setting on the System page, reboot. Wait about 10 minutes, then reboot one more time.
 
I just tried and it's still in read only

ASUSWRT-Merlin RT-AC3200 384.9-0 Sat Feb 2 18:17:31 UTC 2019
xxxx@RT-AC3200:/tmp/home/root# cd ..
xxxx@RT-AC3200:/tmp/home# cd ..
xxxx@RT-AC3200:/tmp# cd ..
xxxx@RT-AC3200:/# cd jffs/
xxxx@RT-AC3200:/jffs# ls
xxxx@RT-AC3200:/jffs# mkdir test
mkdir: can't create directory 'test': Read-only file system
xxxx@RT-AC3200:/jffs#

xxxx@RT-AC3200:/jffs# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 32.9M 32.9M 0 100% /
devtmpfs 124.6M 0 124.6M 0% /dev
tmpfs 124.7M 2.2M 122.5M 2% /tmp
/dev/sda1 28.2G 172.0M 26.6G 1% /tmp/mnt/entware

xxxx@RT-AC3200:/jffs# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=127576k,nr_inodes=31894,mode=755)
proc on /proc type proc (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda1 on /tmp/mnt/entware type ext4 (rw,nodev,relatime,barrier=1,data=ordered)
xxxx@RT-AC3200:/jffs#
 
yes:
xxxx@RT-AC3200:/jffs# cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00020000 "boot"
mtd1: 00180000 00020000 "nvram"
mtd2: 03e00000 00020000 "linux"
mtd3: 03c4d170 00020000 "rootfs"
mtd4: 04000000 00020000 "brcmnand"
 
yes:
xxxx@RT-AC3200:/jffs# cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00020000 "boot"
mtd1: 00180000 00020000 "nvram"
mtd2: 03e00000 00020000 "linux"
mtd3: 03c4d170 00020000 "rootfs"
mtd4: 04000000 00020000 "brcmnand"
What about
Code:
nvram get jffs2_on
Should be 1, but never know.
 
Check your system log for any JFFS-related errors at boot time.
 
the only thing i see is: Apr 11 08:55:03 kernel: /usr/sbin/acme-client: /jffs/.le/vpn: -c directory must exist

i did a dmesg | grep jffs
 
the only thing i see is: Apr 11 08:55:03 kernel: /usr/sbin/acme-client: /jffs/.le/vpn: -c directory must exist

i did a dmesg | grep jffs

Try -i to make it case insensitive:

Code:
dmesg | grep -i jffs

Also check the same thing in /tmp/syslog.txt
 
here is the result:

JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
/usr/sbin/acme-client: /jffs/.le/vpn: -c directory must exist
/usr/sbin/acme-client: /jffs/.le/vpn: -c directory must exist


I saw this command on another forum:

flash_erase -j /dev/mtd/4 0 0 && reboot

Is it good to run ?
 
Last edited:
Looks like something is weird with your jffs partition, judging from this error message:

Code:
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes

I saw this command on another forum:

flash_erase -j /dev/mtd/4 0 0 && reboot

Is it good to run ?

That command does not exist under Asuswrt. mtd-erase would be the equivalent (but it has a different syntax).

Unfortunately I'm not familiar enough with the low-level working of jffs2, so I don't dare make any further suggestion as the wrong one could potentially brick your router (I lost my first RT-AC87U dev sample to that...). Some with better knowledge of JFFS and MTD partitions would be more qualified than me at this point.
 
No one have an idea ?

With all avenues seemingly exhausted now, I would do a full reset to factory defaults, perform an NVRAM erase, flash the latest firmware 384.10_2 and after another reset to factory defaults via the GUI (including checking the box that says 'initialize all settings...', re-flash the same firmware (384.10_2) once more.

Now, I would do a minimal and manual configuration to secure the router and connect to your ISP.

At this point, if the jffs partition is still in read-only mode? I would be buying a new router as this seems like a hardware failure.

Right now? It seems like a rogue script/command has left your jffs partition partially unusable. Hopefully, you can re-enable it with the steps outlined above.

For further details on getting your router to a good/known state, please see the link in my signature below.
 
Good, thank you very much ! I'll try that next week. Can i backup my settings if everything is going well and import them after the process ?
 
Good, thank you very much ! I'll try that next week. Can i backup my settings if everything is going well and import them after the process ?

No, that would negate the reset to factory defaults completely. ;)
 
Ok, i'll give it a try, i have a lot of parental control for the internet scheduling, i will have to copy all this before reseting !
 

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