What's new

jffs partition is read-only and cannot format-restore

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

puremind

Regular Contributor
Hoping someone can help,

Browsing all day and haven't found anything that works.

GT-AX11000 PRO with 388.2_2_rog
All has been working fine since I upgraded from 2_1 when released.

Four days ago I noticed there is no way I can change some settings and make them persist... at the end I am seeing the jffs partition is read only and causing these problems:

Bash:
admin@GT-AX11000_Pro:/jffs# rm syslog.log-1
rm: remove 'syslog.log-1'? y
rm: can't remove 'syslog.log-1': Read-only file system
admin@GT-AX11000_Pro:/jffs# pwd
/jffs

The partition is not full and is not a problem with that file, something simple as the below doesn't work either.

Code:
admin@GT-AX11000_Pro:/jffs# touch x
touch: x: Read-only file system



Code:
admin@GT-AX11000_Pro:/jffs# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                51.9M     51.9M         0 100% /
devtmpfs                409.2M      4.0K    409.2M   0% /dev
tmpfs                   497.4M    252.0K    497.2M   0% /var
tmpfs                   497.4M      2.0M    495.5M   0% /tmp/mnt
ubi:data                 16.8M     72.0K     15.8M   0% /data
ubi:defaults            497.4M      2.0M    495.5M   0% /tmp/mnt/defaults
ubi:jffs2                44.5M      8.9M     33.3M  21% /jffs
tmpfs                   497.4M      2.0M    495.5M   0% /tmp/mnt
ubi:defaults            497.4M      2.0M    495.5M   0% /tmp/mnt/defaults
tmpfs                   497.4M      2.0M    495.5M   0% /tmp
/dev/sda1                58.6G      2.1G     53.4G   4% /tmp/mnt/samsung
tmpfs                   497.4M      2.0M    495.5M   0% /www/require/modules/menuTree.js

and is reported ok in the GUI.



Also tried the hard-reset by holding WPS button at restart ... the /jffs partition persists with its contents and only read-only. :(


Because is ubifs partition, seems there is no option on the GUI to format, as it's intended for older jffs partitions

more info

Code:
cat /proc/mounts
/dev/root / squashfs ro,relatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=419052k,nr_inodes=104763,mode=755 0 0
proc /proc proc rw,relatime 0 0
tmpfs /var tmpfs rw,relatime 0 0
tmpfs /tmp/mnt tmpfs rw,relatime,size=16k,mode=755 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
ubi:data /data ubifs rw,relatime,assert=read-only,ubi=0,vol=10 0 0
ubi:defaults /tmp/mnt/defaults ubifs rw,relatime,assert=read-only,ubi=0,vol=11 0 0
ubi:jffs2 /jffs ubifs ro,relatime,assert=read-only,ubi=0,vol=13 0 0
tmpfs /tmp/mnt tmpfs rw,relatime,size=16k,mode=755 0 0
ubi:defaults /tmp/mnt/defaults ubifs rw,relatime,assert=read-only,ubi=0,vol=11 0 0
tmpfs /tmp tmpfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
/dev/sda1 /tmp/mnt/samsung ext4 rw,nodev,relatime 0 0
tmpfs /www/require/modules/menuTree.js tmpfs rw,relatime 0 0

seems that the /jffs is mounted as "ro" for whatever reason, however the other two partitions /data and /tmp/mnt/data do mount with "rw"

ubi:jffs2 /jffs ubifs ro,relatime,assert=read-only,ubi=0,vol=13 0 0

Attempted
mount -t ubifs -o rw,remount -force /dev/ubi0_13 /jffs
and no luck either

How can I safely reformat the partition or get it to be mounted rw as usual ?
Code:
admin@GT-AX11000_Pro:/data# cat /sys/class/ubi/ubi0_13/name
jffs2



Digging some more:
Code:
cat /proc/mtd
dev:    size   erasesize  name
mtd0: 10000000 00020000 "brcmnand.0"
mtd1: 00200000 00020000 "loader"
mtd2: 0fc00000 00020000 "image"
mtd3: 00080000 00020000 "crashlog"
mtd4: 00000500 0001f000 "metadata1"
mtd5: 00000500 0001f000 "metadata2"
mtd6: 00a235a4 0001f000 "bootfs1"
mtd7: 034eb000 0001f000 "rootfs1"
mtd8: 00a22ec8 0001f000 "bootfs2"
mtd9: 034eb000 0001f000 "rootfs2"
mtd10: 0141a000 0001f000 "data"
mtd11: 0081d000 0001f000 "defaults"
mtd12: 03203000 0001f000 "jffs2"

And there are some more commands listed here:

However I don't want to poke around excessively and break something else.

Wondering why it appears as mtd12 in /proc/mtd but as ubi0_13 on the other side...



Is there anything I can do to get this restored / resolved ?
Please help. Thank you.
 
Last edited:
Hoping someone can help,

Browsing all day and haven't found anything that works.

GT-AX11000 PRO with 388.2_2_rog
All has been working fine since I upgraded from 2_1 when released.

Four days ago I noticed there is no way I can change some settings and make them persist... at the end I am seeing the jffs partition is read only and causing these problems:

Bash:
admin@GT-AX11000_Pro:/jffs# rm syslog.log-1
rm: remove 'syslog.log-1'? y
rm: can't remove 'syslog.log-1': Read-only file system
admin@GT-AX11000_Pro:/jffs# pwd
/jffs

The partition is not full and is not a problem with that file, something simple as the below doesn't work either.

Code:
admin@GT-AX11000_Pro:/jffs# touch x
touch: x: Read-only file system



Code:
admin@GT-AX11000_Pro:/jffs# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                51.9M     51.9M         0 100% /
devtmpfs                409.2M      4.0K    409.2M   0% /dev
tmpfs                   497.4M    252.0K    497.2M   0% /var
tmpfs                   497.4M      2.0M    495.5M   0% /tmp/mnt
ubi:data                 16.8M     72.0K     15.8M   0% /data
ubi:defaults            497.4M      2.0M    495.5M   0% /tmp/mnt/defaults
ubi:jffs2                44.5M      8.9M     33.3M  21% /jffs
tmpfs                   497.4M      2.0M    495.5M   0% /tmp/mnt
ubi:defaults            497.4M      2.0M    495.5M   0% /tmp/mnt/defaults
tmpfs                   497.4M      2.0M    495.5M   0% /tmp
/dev/sda1                58.6G      2.1G     53.4G   4% /tmp/mnt/samsung
tmpfs                   497.4M      2.0M    495.5M   0% /www/require/modules/menuTree.js

and is reported ok in the GUI.



Also tried the hard-reset by holding WPS button at restart ... the /jffs partition persists with its contents and only read-only. :(


Because is ubifs partition, seems there is no option on the GUI to format, as it's intended for older jffs partitions

more info

Code:
cat /proc/mounts
/dev/root / squashfs ro,relatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=419052k,nr_inodes=104763,mode=755 0 0
proc /proc proc rw,relatime 0 0
tmpfs /var tmpfs rw,relatime 0 0
tmpfs /tmp/mnt tmpfs rw,relatime,size=16k,mode=755 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
ubi:data /data ubifs rw,relatime,assert=read-only,ubi=0,vol=10 0 0
ubi:defaults /tmp/mnt/defaults ubifs rw,relatime,assert=read-only,ubi=0,vol=11 0 0
ubi:jffs2 /jffs ubifs ro,relatime,assert=read-only,ubi=0,vol=13 0 0
tmpfs /tmp/mnt tmpfs rw,relatime,size=16k,mode=755 0 0
ubi:defaults /tmp/mnt/defaults ubifs rw,relatime,assert=read-only,ubi=0,vol=11 0 0
tmpfs /tmp tmpfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
/dev/sda1 /tmp/mnt/samsung ext4 rw,nodev,relatime 0 0
tmpfs /www/require/modules/menuTree.js tmpfs rw,relatime 0 0

seems that the /jffs is mounted as "ro" for whatever reason, however the other two partitions /data and /tmp/mnt/data do mount with "rw"

ubi:jffs2 /jffs ubifs ro,relatime,assert=read-only,ubi=0,vol=13 0 0

Attempted
mount -t ubifs -o rw,remount -force /dev/ubi0_13 /jffs
and no luck either

How can I safely reformat the partition or get it to be mounted rw as usual ?
Code:
admin@GT-AX11000_Pro:/data# cat /sys/class/ubi/ubi0_13/name
jffs2



Digging some more:
Code:
cat /proc/mtd
dev:    size   erasesize  name
mtd0: 10000000 00020000 "brcmnand.0"
mtd1: 00200000 00020000 "loader"
mtd2: 0fc00000 00020000 "image"
mtd3: 00080000 00020000 "crashlog"
mtd4: 00000500 0001f000 "metadata1"
mtd5: 00000500 0001f000 "metadata2"
mtd6: 00a235a4 0001f000 "bootfs1"
mtd7: 034eb000 0001f000 "rootfs1"
mtd8: 00a22ec8 0001f000 "bootfs2"
mtd9: 034eb000 0001f000 "rootfs2"
mtd10: 0141a000 0001f000 "data"
mtd11: 0081d000 0001f000 "defaults"
mtd12: 03203000 0001f000 "jffs2"

And there are some more commands listed here:

However I don't want to poke around excessively and break something else.

Wondering why it appears as mtd12 in /proc/mtd but as ubi0_13 on the other side...



Is there anything I can do to get this restored / resolved ?
Please help. Thank you.

Someone with a similar issue found that doing the factory reset in the GUI and making sure to check off "initialize settings" actually did a better job than WPS reset. I think their problem was NVRAM seemed to be read only, but worth a try.
 
mmm

Not the issue here, I've attempted nvram removing jffs and ubifs entries manually, comitting and restarting and nvram did store ok, but no effect whatsoever over the problem.
That's my current. I understand from a Merlin's post that ubifs_format=1 is not implemented, but tried anyway.

Code:
admin@GT-AX11000_Pro:/dev# nvram show | grep jffs
jffs2_format=1
jffs2_on=1
jffs2_scripts=1
log_path=/jffs
size: 105182 bytes (91426 left)
admin@GT-AX11000_Pro:/dev# nvram show | grep ubi
ubifs_format=0
ubifs_on=1
ubifs_size=52441088
size: 105182 bytes (91426 left)

any suggestions?

PS- also did try soft reset and no luck. The jffs partition seems never gets removed whatever I do.
 
your hardware is faulty, ssh to the box do nvram erase, without rebooting go to the gui and reset stuff to factory settings with that box ticked about initialize things to default.

step two is to return that thing to the reseller.
 
mmm

Not the issue here, I've attempted nvram removing jffs and ubifs entries manually, comitting and restarting and nvram did store ok, but no effect whatsoever over the problem.
That's my current. I understand from a Merlin's post that ubifs_format=1 is not implemented, but tried anyway.

Code:
admin@GT-AX11000_Pro:/dev# nvram show | grep jffs
jffs2_format=1
jffs2_on=1
jffs2_scripts=1
log_path=/jffs
size: 105182 bytes (91426 left)
admin@GT-AX11000_Pro:/dev# nvram show | grep ubi
ubifs_format=0
ubifs_on=1
ubifs_size=52441088
size: 105182 bytes (91426 left)

any suggestions?

PS- also did try soft reset and no luck. The jffs partition seems never gets removed whatever I do.

If you're running merlin firmware, have you tried going in and doing "format jffs partition at next boot", applying, then rebooting?
 
If you're running merlin firmware, have you tried going in and doing "format jffs partition at next boot", applying, then rebooting?
that option is not there because is ubifs , is not meant to be there as per Merlin's comments in the forum
 
your hardware is faulty, ssh to the box do nvram erase, without rebooting go to the gui and reset stuff to factory settings with that box ticked about initialize things to default.

step two is to return that thing to the reseller.

will try step 1 first ! thanks

bought this 7 months ago and have had no trouble
there must be a way at least to fully reformat / delete those partitions
 
what this other user said about format JFFS next boot, try that too, but after the nvram erase and GUI reset stuff.
 
what this other user said about format JFFS next boot, try that too, but after the nvram erase and GUI reset stuff.

That option is not meant to be there and is OK is not :


However, Factory reset to default with initialize option did NOT “wipe“ the jffs user scripts and custom config files

Guessing Merlin might have steps on how to reformat the ubifs ?
 
that option is not there because is ubifs , is not meant to be there as per Merlin's comments in the forum

OK something must have changed, your router is much newer than mine.

Have you tried downgrading to a previous firmware, then doing a hard factory reset and/or software reset?
 
OK something must have changed, your router is much newer than mine.

Have you tried downgrading to a previous firmware, then doing a hard factory reset and/or software reset?

Not yet... there must be a way to delete that partition and create it again, right?
Pisses me off the fact that a factory reset and soft reset did leave the /jffs partition there with all the data !!!

Next step is the nvram reset then soft reset at the same time... otherwise I won't know what else.
 
Not yet... there must be a way to delete that partition and create it again, right?
Pisses me off the fact that a factory reset and soft reset did leave the /jffs partition there with all the data !!!

Next step is the nvram reset then soft reset at the same time... otherwise I won't know what else.

JFFS is totally different from NVRAM, don't think that will have an impact but worth a try. But after that I'd try downgrading and doing factory resets/initializations.

Maybe @RMerlin can shed some more light on this newer file system.
 
JFFS is totally different from NVRAM, don't think that will have an impact but worth a try. But after that I'd try downgrading and doing factory resets/initializations.

Maybe @RMerlin can shed some more light on this newer file system.

There are a set of commands there to operate them,
How can I change a single file from an UBI image

but they don't seem straight forward and preferring here to ask rather than break it more.

If there a canned way to reformat that ubifs thing completely would be the best way to go.
 
That option is not meant to be there and is OK is not :


However, Factory reset to default with initialize option did NOT “wipe“ the jffs user scripts and custom config files

Guessing Merlin might have steps on how to reformat the ubifs ?
Yeah but the fact that you cant wipe the JFFS partition is either hardware error or software error. If it's software related, try to fix that first.
 
There are a set of commands there to operate them,
How can I change a single file from an UBI image

but they don't seem straight forward and preferring here to ask rather than break it more.

If there a canned way to reformat that ubifs thing completely would be the best way to go.

Honestly I wouldn't mess with it too much and make it worse. Merlin may know of a command to do something but downgrading and hard resetting would let the router firmware do the format (hopefully) for you. Perhaps that function of the hard reset is broken in this firmware verson.
 
Executed
nvram clear
nvram commit

and before rebooting I did the software reset settings with the box ticked to delete everything

Well, /jffs is still there and with same contents. Seems the system is refusing to delete/wipe the partition.

Hoping Merlin can provide some extra steps...


Logs were more explicit now, see portion where there might be clues:

May 5 06:05:22 kernel: UBIFS error (ubi0:13 pid 258): ubifs_assert_failed: UBIFS assert failed: dirty == LPROPS_NC || dirty >= 0, in fs/ubifs/lprops.c:557
May 5 06:05:22 kernel: UBIFS warning (ubi0:13 pid 258): ubifs_ro_mode.part.0: switched to read-only mode, error -22



Code:
May  5 06:05:22 kernel: VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
May  5 06:05:22 kernel: devtmpfs: mounted
May  5 06:05:22 kernel: Freeing unused kernel memory: 448K
May  5 06:05:22 kernel: Run /sbin/init as init process
May  5 06:05:22 kernel: UBIFS (ubi0:10): background thread "ubifs_bgt0_10" started, PID 213
May  5 06:05:22 kernel: UBIFS (ubi0:10): UBIFS: mounted UBI device 0, volume 10, name "data"
May  5 06:05:22 kernel: UBIFS (ubi0:10): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
May  5 06:05:22 kernel: UBIFS (ubi0:10): FS size: 19808256 bytes (18 MiB, 156 LEBs), journal size 1015809 bytes (0 MiB, 8 LEBs)
May  5 06:05:22 kernel: UBIFS (ubi0:10): reserved for root: 935592 bytes (913 KiB)
May  5 06:05:22 kernel: UBIFS (ubi0:10): media format: w5/r0 (latest is w5/r0), UUID 16B2F888-5C33-4506-ACAA-867C94274441, small LPT model
May  5 06:05:22 kernel: UBIFS (ubi0:11): background thread "ubifs_bgt0_11" started, PID 229
May  5 06:05:22 kernel: UBIFS (ubi0:11): UBIFS: mounted UBI device 0, volume 11, name "defaults"
May  5 06:05:22 kernel: UBIFS (ubi0:11): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
May  5 06:05:22 kernel: UBIFS (ubi0:11): FS size: 7237632 bytes (6 MiB, 57 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs)
May  5 06:05:22 kernel: UBIFS (ubi0:11): reserved for root: 341850 bytes (333 KiB)
May  5 06:05:22 kernel: UBIFS (ubi0:11): media format: w5/r0 (latest is w5/r0), UUID B93A4F4C-5FDF-4819-84D4-C0B17C6C9BD5, small LPT model
May  5 06:05:22 kernel: UBIFS (ubi0:13): background thread "ubifs_bgt0_13" started, PID 259
May  5 06:05:22 kernel: UBIFS (ubi0:13): recovery needed
May  5 06:05:22 kernel: UBIFS error (ubi0:13 pid 258): ubifs_assert_failed: UBIFS assert failed: dirty == LPROPS_NC || dirty >= 0, in fs/ubifs/lprops.c:557
May  5 06:05:22 kernel: UBIFS warning (ubi0:13 pid 258): ubifs_ro_mode.part.0: switched to read-only mode, error -22
May  5 06:05:22 kernel: CPU: 2 PID: 258 Comm: mount Not tainted 4.19.183 #1
May  5 06:05:22 kernel: Hardware name: GTAX11000_PRO (DT)
May  5 06:05:22 kernel: Call trace:
May  5 06:05:22 kernel:  dump_backtrace+0x0/0x150
May  5 06:05:22 kernel:  show_stack+0x14/0x20
May  5 06:05:22 kernel:  dump_stack+0x94/0xc4
May  5 06:05:22 kernel:  ubifs_ro_mode.part.0+0x44/0x50
May  5 06:05:22 kernel:  ubifs_ro_mode+0x18/0x20
May  5 06:05:22 kernel:  ubifs_assert_failed+0x48/0x70
May  5 06:05:22 kernel:  ubifs_change_lp+0x4a4/0x5f0
May  5 06:05:22 kernel:  ubifs_replay_journal+0x778/0xf80
May  5 06:05:22 kernel:  ubifs_mount+0xee4/0x1370
May  5 06:05:22 kernel:  mount_fs+0x1c/0xf0
May  5 06:05:22 kernel:  vfs_kern_mount.part.0+0x4c/0x130
May  5 06:05:22 kernel:  do_mount+0x18c/0xba0
May  5 06:05:22 kernel:  __arm64_compat_sys_mount+0x98/0x140
May  5 06:05:22 kernel:  el0_svc_common+0x70/0x170
May  5 06:05:22 kernel:  el0_svc_compat_handler+0x1c/0x30
May  5 06:05:22 kernel:  el0_svc_compat+0x8/0x18
May  5 06:05:22 kernel: UBIFS warning (ubi0:13 pid 258): ubifs_recover_size: inode 323091 failed to fix size 78358 -> 78441 error -30
May  5 06:05:22 kernel: UBIFS (ubi0:13): background thread "ubifs_bgt0_13" stops
May  5 06:05:22 kernel: UBIFS (ubi0:13): recovery needed
May  5 06:05:22 kernel: UBIFS error (ubi0:13 pid 258): ubifs_assert_failed: UBIFS assert failed: dirty == LPROPS_NC || dirty >= 0, in fs/ubifs/lprops.c:557
May  5 06:05:22 kernel: UBIFS warning (ubi0:13 pid 258): ubifs_ro_mode.part.0: switched to read-only mode, error -22
May  5 06:05:22 kernel: CPU: 2 PID: 258 Comm: mount Not tainted 4.19.183 #1
May  5 06:05:22 kernel: Hardware name: GTAX11000_PRO (DT)
May  5 06:05:22 kernel: Call trace:
May  5 06:05:22 kernel:  dump_backtrace+0x0/0x150
May  5 06:05:22 kernel:  show_stack+0x14/0x20
May  5 06:05:22 kernel:  dump_stack+0x94/0xc4
May  5 06:05:22 kernel:  ubifs_ro_mode.part.0+0x44/0x50
May  5 06:05:22 kernel:  ubifs_ro_mode+0x18/0x20
May  5 06:05:22 kernel:  ubifs_assert_failed+0x48/0x70
May  5 06:05:22 kernel:  ubifs_change_lp+0x4a4/0x5f0
May  5 06:05:22 kernel:  ubifs_replay_journal+0x778/0xf80
May  5 06:05:22 kernel:  ubifs_mount+0xee4/0x1370
May  5 06:05:22 kernel:  mount_fs+0x1c/0xf0
May  5 06:05:22 kernel:  vfs_kern_mount.part.0+0x4c/0x130
May  5 06:05:22 kernel:  do_mount+0x18c/0xba0
May  5 06:05:22 kernel:  __arm64_compat_sys_mount+0x98/0x140
May  5 06:05:22 kernel:  el0_svc_common+0x70/0x170
May  5 06:05:22 kernel:  el0_svc_compat_handler+0x1c/0x30
May  5 06:05:22 kernel:  el0_svc_compat+0x8/0x18
May  5 06:05:22 kernel: UBIFS (ubi0:13): recovery deferred
May  5 06:05:22 kernel: UBIFS (ubi0:13): UBIFS: mounted UBI device 0, volume 13, name "jffs2", R/O mode
May  5 06:05:22 kernel: UBIFS (ubi0:13): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
May  5 06:05:22 kernel: UBIFS (ubi0:13): FS size: 51171328 bytes (48 MiB, 403 LEBs), journal size 2539520 bytes (2 MiB, 20 LEBs)
May  5 06:05:22 kernel: UBIFS (ubi0:13): reserved for root: 2416947 bytes (2360 KiB)
May  5 06:05:22 kernel: UBIFS (ubi0:13): media format: w5/r0 (latest is w5/r0), UUID 99178CE8-EA43-4F17-B5F8-06C64B6A5D1E, small LPT model
May  5 06:05:22 kernel: wlcsm: module license 'Proprietary' taints kernel.
May  5 06:05:22 kernel: Disabling lock debugging due to kernel taint
May  5 06:05:22 kernel: Initializing WLCSM Module
May  5 06:05:22 kernel: WLCSM Module loaded successfully
May  5 06:05:22 kernel: mtdoops: Attached to MTD device 3
May  5 06:05:22 kernel: BCMLIBS loaded...
May  5 06:05:22 kernel: ^[[0;36;44mBroadcom MPM Driver Intializing^[[0m
May  5 06:05:22 kernel: MPM: virt_base = 0xffffff800b052000, phy_base = 0x35000000, total_mem_size = 134217728
May  5 06:05:22 kernel: MPM: ebuf_size = 512, ebuf_total = 262144/262144
May  5 06:05:22 kernel: Pool[0]: alloc 1 EBUFs (512 bytes)
May  5 06:05:22 kernel: Pool[1]: alloc 2 EBUFs (1024 bytes)
May  5 06:05:22 kernel: Pool[2]: alloc 4 EBUFs (2048 bytes)
May  5 06:05:22 kernel: Pool[3]: alloc 8 EBUFs (4096 bytes)
May  5 06:05:22 kernel: MPM Pool Numbers: SKB = 0, Data = 3, DQM = 2
May  5 06:05:22 kernel: MPM Total Commands = 41/64
May  5 06:05:22 kernel: MPM: ebuf_size 1, mpm_size_log2_kb 8
May  5 06:05:22 kernel: MPM Enabled
May  5 06:05:22 kernel: ^[[0;36;44mBroadcom HW Memory Pool Manager (MPM) Char Driver v0.1 Registered <342>^[[0m
May  5 06:05:22 kernel: Broadcom BPM Module Char Driver v0.1 Registered<304>^[[0m
May  5 06:05:22 kernel: Scratch pad is not initialized.
May  5 06:05:22 kernel: Scratch pad is not initialized.
May  5 06:05:22 kernel: Scratch pad is not initialized.
 
Executed
nvram clear
nvram commit

and before rebooting I did the software reset settings with the box ticked to delete everything

Well, /jffs is still there and with same contents. Seems the system is refusing to delete/wipe the partition.

Hoping Merlin can provide some extra steps...


Logs were more explicit now, see portion where there might be clues:

May 5 06:05:22 kernel: UBIFS error (ubi0:13 pid 258): ubifs_assert_failed: UBIFS assert failed: dirty == LPROPS_NC || dirty >= 0, in fs/ubifs/lprops.c:557
May 5 06:05:22 kernel: UBIFS warning (ubi0:13 pid 258): ubifs_ro_mode.part.0: switched to read-only mode, error -22



Code:
May  5 06:05:22 kernel: VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
May  5 06:05:22 kernel: devtmpfs: mounted
May  5 06:05:22 kernel: Freeing unused kernel memory: 448K
May  5 06:05:22 kernel: Run /sbin/init as init process
May  5 06:05:22 kernel: UBIFS (ubi0:10): background thread "ubifs_bgt0_10" started, PID 213
May  5 06:05:22 kernel: UBIFS (ubi0:10): UBIFS: mounted UBI device 0, volume 10, name "data"
May  5 06:05:22 kernel: UBIFS (ubi0:10): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
May  5 06:05:22 kernel: UBIFS (ubi0:10): FS size: 19808256 bytes (18 MiB, 156 LEBs), journal size 1015809 bytes (0 MiB, 8 LEBs)
May  5 06:05:22 kernel: UBIFS (ubi0:10): reserved for root: 935592 bytes (913 KiB)
May  5 06:05:22 kernel: UBIFS (ubi0:10): media format: w5/r0 (latest is w5/r0), UUID 16B2F888-5C33-4506-ACAA-867C94274441, small LPT model
May  5 06:05:22 kernel: UBIFS (ubi0:11): background thread "ubifs_bgt0_11" started, PID 229
May  5 06:05:22 kernel: UBIFS (ubi0:11): UBIFS: mounted UBI device 0, volume 11, name "defaults"
May  5 06:05:22 kernel: UBIFS (ubi0:11): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
May  5 06:05:22 kernel: UBIFS (ubi0:11): FS size: 7237632 bytes (6 MiB, 57 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs)
May  5 06:05:22 kernel: UBIFS (ubi0:11): reserved for root: 341850 bytes (333 KiB)
May  5 06:05:22 kernel: UBIFS (ubi0:11): media format: w5/r0 (latest is w5/r0), UUID B93A4F4C-5FDF-4819-84D4-C0B17C6C9BD5, small LPT model
May  5 06:05:22 kernel: UBIFS (ubi0:13): background thread "ubifs_bgt0_13" started, PID 259
May  5 06:05:22 kernel: UBIFS (ubi0:13): recovery needed
May  5 06:05:22 kernel: UBIFS error (ubi0:13 pid 258): ubifs_assert_failed: UBIFS assert failed: dirty == LPROPS_NC || dirty >= 0, in fs/ubifs/lprops.c:557
May  5 06:05:22 kernel: UBIFS warning (ubi0:13 pid 258): ubifs_ro_mode.part.0: switched to read-only mode, error -22
May  5 06:05:22 kernel: CPU: 2 PID: 258 Comm: mount Not tainted 4.19.183 #1
May  5 06:05:22 kernel: Hardware name: GTAX11000_PRO (DT)
May  5 06:05:22 kernel: Call trace:
May  5 06:05:22 kernel:  dump_backtrace+0x0/0x150
May  5 06:05:22 kernel:  show_stack+0x14/0x20
May  5 06:05:22 kernel:  dump_stack+0x94/0xc4
May  5 06:05:22 kernel:  ubifs_ro_mode.part.0+0x44/0x50
May  5 06:05:22 kernel:  ubifs_ro_mode+0x18/0x20
May  5 06:05:22 kernel:  ubifs_assert_failed+0x48/0x70
May  5 06:05:22 kernel:  ubifs_change_lp+0x4a4/0x5f0
May  5 06:05:22 kernel:  ubifs_replay_journal+0x778/0xf80
May  5 06:05:22 kernel:  ubifs_mount+0xee4/0x1370
May  5 06:05:22 kernel:  mount_fs+0x1c/0xf0
May  5 06:05:22 kernel:  vfs_kern_mount.part.0+0x4c/0x130
May  5 06:05:22 kernel:  do_mount+0x18c/0xba0
May  5 06:05:22 kernel:  __arm64_compat_sys_mount+0x98/0x140
May  5 06:05:22 kernel:  el0_svc_common+0x70/0x170
May  5 06:05:22 kernel:  el0_svc_compat_handler+0x1c/0x30
May  5 06:05:22 kernel:  el0_svc_compat+0x8/0x18
May  5 06:05:22 kernel: UBIFS warning (ubi0:13 pid 258): ubifs_recover_size: inode 323091 failed to fix size 78358 -> 78441 error -30
May  5 06:05:22 kernel: UBIFS (ubi0:13): background thread "ubifs_bgt0_13" stops
May  5 06:05:22 kernel: UBIFS (ubi0:13): recovery needed
May  5 06:05:22 kernel: UBIFS error (ubi0:13 pid 258): ubifs_assert_failed: UBIFS assert failed: dirty == LPROPS_NC || dirty >= 0, in fs/ubifs/lprops.c:557
May  5 06:05:22 kernel: UBIFS warning (ubi0:13 pid 258): ubifs_ro_mode.part.0: switched to read-only mode, error -22
May  5 06:05:22 kernel: CPU: 2 PID: 258 Comm: mount Not tainted 4.19.183 #1
May  5 06:05:22 kernel: Hardware name: GTAX11000_PRO (DT)
May  5 06:05:22 kernel: Call trace:
May  5 06:05:22 kernel:  dump_backtrace+0x0/0x150
May  5 06:05:22 kernel:  show_stack+0x14/0x20
May  5 06:05:22 kernel:  dump_stack+0x94/0xc4
May  5 06:05:22 kernel:  ubifs_ro_mode.part.0+0x44/0x50
May  5 06:05:22 kernel:  ubifs_ro_mode+0x18/0x20
May  5 06:05:22 kernel:  ubifs_assert_failed+0x48/0x70
May  5 06:05:22 kernel:  ubifs_change_lp+0x4a4/0x5f0
May  5 06:05:22 kernel:  ubifs_replay_journal+0x778/0xf80
May  5 06:05:22 kernel:  ubifs_mount+0xee4/0x1370
May  5 06:05:22 kernel:  mount_fs+0x1c/0xf0
May  5 06:05:22 kernel:  vfs_kern_mount.part.0+0x4c/0x130
May  5 06:05:22 kernel:  do_mount+0x18c/0xba0
May  5 06:05:22 kernel:  __arm64_compat_sys_mount+0x98/0x140
May  5 06:05:22 kernel:  el0_svc_common+0x70/0x170
May  5 06:05:22 kernel:  el0_svc_compat_handler+0x1c/0x30
May  5 06:05:22 kernel:  el0_svc_compat+0x8/0x18
May  5 06:05:22 kernel: UBIFS (ubi0:13): recovery deferred
May  5 06:05:22 kernel: UBIFS (ubi0:13): UBIFS: mounted UBI device 0, volume 13, name "jffs2", R/O mode
May  5 06:05:22 kernel: UBIFS (ubi0:13): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
May  5 06:05:22 kernel: UBIFS (ubi0:13): FS size: 51171328 bytes (48 MiB, 403 LEBs), journal size 2539520 bytes (2 MiB, 20 LEBs)
May  5 06:05:22 kernel: UBIFS (ubi0:13): reserved for root: 2416947 bytes (2360 KiB)
May  5 06:05:22 kernel: UBIFS (ubi0:13): media format: w5/r0 (latest is w5/r0), UUID 99178CE8-EA43-4F17-B5F8-06C64B6A5D1E, small LPT model
May  5 06:05:22 kernel: wlcsm: module license 'Proprietary' taints kernel.
May  5 06:05:22 kernel: Disabling lock debugging due to kernel taint
May  5 06:05:22 kernel: Initializing WLCSM Module
May  5 06:05:22 kernel: WLCSM Module loaded successfully
May  5 06:05:22 kernel: mtdoops: Attached to MTD device 3
May  5 06:05:22 kernel: BCMLIBS loaded...
May  5 06:05:22 kernel: ^[[0;36;44mBroadcom MPM Driver Intializing^[[0m
May  5 06:05:22 kernel: MPM: virt_base = 0xffffff800b052000, phy_base = 0x35000000, total_mem_size = 134217728
May  5 06:05:22 kernel: MPM: ebuf_size = 512, ebuf_total = 262144/262144
May  5 06:05:22 kernel: Pool[0]: alloc 1 EBUFs (512 bytes)
May  5 06:05:22 kernel: Pool[1]: alloc 2 EBUFs (1024 bytes)
May  5 06:05:22 kernel: Pool[2]: alloc 4 EBUFs (2048 bytes)
May  5 06:05:22 kernel: Pool[3]: alloc 8 EBUFs (4096 bytes)
May  5 06:05:22 kernel: MPM Pool Numbers: SKB = 0, Data = 3, DQM = 2
May  5 06:05:22 kernel: MPM Total Commands = 41/64
May  5 06:05:22 kernel: MPM: ebuf_size 1, mpm_size_log2_kb 8
May  5 06:05:22 kernel: MPM Enabled
May  5 06:05:22 kernel: ^[[0;36;44mBroadcom HW Memory Pool Manager (MPM) Char Driver v0.1 Registered <342>^[[0m
May  5 06:05:22 kernel: Broadcom BPM Module Char Driver v0.1 Registered<304>^[[0m
May  5 06:05:22 kernel: Scratch pad is not initialized.
May  5 06:05:22 kernel: Scratch pad is not initialized.
May  5 06:05:22 kernel: Scratch pad is not initialized.

Those steps does not clear the JFFS. But if there is something borking with clearing the JFFS, those steps will clear thos issues. So if your 3rd step is to clera JFFS at the next boot and the JFFS does not clear. your 4th step is to return the device.


Meanwhile you are awaiting a new device i suggest you listen to this.
 
I agree with the collective that at this point, I would wait for further advice from @RMerlin before touching any of the ”ubi” commands in /bin. ubifs is a bit more complex in setup than the older jffs2 filesystem. ubifs (filesystem) sits in top of ubi (volume manager) which sits on top of mid (flash chip device manager). I would say many of the /bin commands in the wrong hands could brick the router.

If you wanted to collect more data, there are a few commands to run (and save the output)

I would first see what dmesg shows during boot:

dmesg | grep ubi

ubi0 would be the entire ubi device. Look for any errors, especially corrupted PEBs

Further down you should see the jffs partition. On my AX88U Pro, it’s ubi0:13.

The check the lowest level - mid:

/bin/mtdinfo -a

Again, you should see the mtd part that as jffs2 - see if it is marked as writeable. Should be.

Last, check what ubi says:

/bin/ubinfo -a

Look for the volume named jffs2. In my case, it shows State: OK.

Good luck. And again, I would avoid trying to reformat by hand for now.
 
I agree with the collective that at this point, I would wait for further advice from @RMerlin before touching any of the ”ubi” commands in /bin. ubifs is a bit more complex in setup than the older jffs2 filesystem. ubifs (filesystem) sits in top of ubi (volume manager) which sits on top of mid (flash chip device manager). I would say many of the /bin commands in the wrong hands could brick the router.

If you wanted to collect more data, there are a few commands to run (and save the output)

I would first see what dmesg shows during boot:

dmesg | grep ubi

ubi0 would be the entire ubi device. Look for any errors, especially corrupted PEBs

Further down you should see the jffs partition. On my AX88U Pro, it’s ubi0:13.

The check the lowest level - mid:

/bin/mtdinfo -a

Again, you should see the mtd part that as jffs2 - see if it is marked as writeable. Should be.

Last, check what ubi says:

/bin/ubinfo -a

Look for the volume named jffs2. In my case, it shows State: OK.

Good luck. And again, I would avoid trying to reformat by hand for now.

Thanks. Yep, this sounds like some logical error and not necessarily a hardware issue...

dmesg reports the same as the long log I posted.

/bin/mtdinfo -a

Code:
admin@GT-AX11000_Pro:/# /bin/mtdinfo -a
Count of MTD devices:           13
Present MTD devices:            mtd0, mtd1, mtd2, mtd3, mtd4, mtd5, mtd6, mtd7, mtd8, mtd9, mtd10, mtd11, mtd12
Sysfs interface supported:      yes

mtd0
Name:                           brcmnand.0
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          2048 (268435456 bytes, 256.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
OOB size:                       108 bytes
Character device major/minor:   90:0
Bad blocks are allowed:         true
Device is writable:             true

mtd1
Name:                           loader
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          16 (2097152 bytes, 2.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
OOB size:                       108 bytes
Character device major/minor:   90:2
Bad blocks are allowed:         true
Device is writable:             true


---- removed some --- 

mtd10
Name:                           data
Type:                           ubi
Eraseblock size:                126976 bytes, 124.0 KiB
Amount of eraseblocks:          166 (21078016 bytes, 20.1 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
Character device major/minor:   90:20
Bad blocks are allowed:         false
Device is writable:             true

mtd11
Name:                           defaults
Type:                           ubi
Eraseblock size:                126976 bytes, 124.0 KiB
Amount of eraseblocks:          67 (8507392 bytes, 8.1 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
Character device major/minor:   90:22
Bad blocks are allowed:         false
Device is writable:             true

mtd12
Name:                           jffs2
Type:                           ubi
Eraseblock size:                126976 bytes, 124.0 KiB
Amount of eraseblocks:          413 (52441088 bytes, 50.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
Character device major/minor:   90:24
Bad blocks are allowed:         false
Device is writable:             true




/bin/ubinfo -a



Code:
/bin/ubinfo -a
UBI version:                    1
Count of UBI devices:           1
UBI control device major/minor: 10:59
Present UBI devices:            ubi0

ubi0
Volumes count:                           9
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     2016 (255983616 bytes, 244.1 MiB)
Amount of available logical eraseblocks: 266 (33775616 bytes, 32.2 MiB)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  40
Current maximum erase counter value:     137
Minimum input/output unit size:          2048 bytes
Character device major/minor:            249:0
Present volumes:                         1, 2, 3, 4, 5, 6, 10, 11, 13

Volume ID:   1 (on ubi0)
Type:        static
Alignment:   1
Size:        1 LEBs (126976 bytes, 124.0 KiB)
Data bytes:  1280 bytes (1.2 KiB)
State:       OK
Name:        metadata1
Character device major/minor: 249:2
-----------------------------------
Volume ID:   2 (on ubi0)
Type:        static
Alignment:   1
Size:        1 LEBs (126976 bytes, 124.0 KiB)
Data bytes:  1280 bytes (1.2 KiB)
State:       OK
Name:        metadata2
Character device major/minor: 249:3
-----------------------------------
Volume ID:   3 (on ubi0)
Type:        static
Alignment:   1
Size:        92 LEBs (11681792 bytes, 11.1 MiB)
Data bytes:  10630564 bytes (10.1 MiB)
State:       OK
Name:        bootfs1
Character device major/minor: 249:4
-----------------------------------
Volume ID:   4 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        437 LEBs (55488512 bytes, 52.9 MiB)
State:       OK
Name:        rootfs1
Character device major/minor: 249:5
-----------------------------------
Volume ID:   5 (on ubi0)
Type:        static
Alignment:   1
Size:        92 LEBs (11681792 bytes, 11.1 MiB)
Data bytes:  10628808 bytes (10.1 MiB)
State:       OK
Name:        bootfs2
Character device major/minor: 249:6
-----------------------------------
Volume ID:   6 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        437 LEBs (55488512 bytes, 52.9 MiB)
State:       OK
Name:        rootfs2
Character device major/minor: 249:7
-----------------------------------
-----------------------------------
-----------------------------------
-----------------------------------
Volume ID:   10 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        166 LEBs (21078016 bytes, 20.1 MiB)
State:       OK
Name:        data
Character device major/minor: 249:11
-----------------------------------
Volume ID:   11 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        67 LEBs (8507392 bytes, 8.1 MiB)
State:       OK
Name:        defaults
Character device major/minor: 249:12
-----------------------------------
-----------------------------------
Volume ID:   13 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        413 LEBs (52441088 bytes, 50.0 MiB)
State:       OK
Name:        jffs2
Character device major/minor: 249:14
 
The issue with the inode seems a logical problem the whatever automatic recovery is unable to manage... if I can get the partition wiped/remounted/formatted then it should resolve.


This illustrates the problem too I believe:

Bash:
admin@GT-AX11000_Pro:/# rm jffs/syslog.log-1
rm: remove 'jffs/syslog.log-1'? y
rm: can't remove 'jffs/syslog.log-1': Read-only file system
admin@GT-AX11000_Pro:/# umount /jffs
admin@GT-AX11000_Pro:/# rm jffs/syslog.log-1
rm: can't remove 'jffs/syslog.log-1': No such file or directory
admin@GT-AX11000_Pro:/# mount -v -t ubifs /dev/ubi0_13 /jffs
admin@GT-AX11000_Pro:/# rm jffs/syslog.log-1
rm: remove 'jffs/syslog.log-1'? y
rm: can't remove 'jffs/syslog.log-1': Read-only file system
admin@GT-AX11000_Pro:/# umount /jffs
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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