OpenWrt Forum Archive

Topic: jffs2: Too few erase blocks (3)

The content of this topic has been archived on 8 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

dmesg gives me

jffs2: Too few erase blocks (3)

any configuration save silently succeeds but on reboot still telnet and factory config...

is it possible to put safety mechanism to making flash image not to overextend internal flash??
i see i can make 12-16 mb image for my 8mb router.. Why?

ofc i burned image that was *around* 8mb (fs image was 6mb) with no sign of rot...

(Last edited by kdulep on 23 Mar 2011, 16:33)

I have the same or similar problem.

I make a new imagefile but it's difficult for me to calculate what's the correct size.
But when I flash my COMTREND CT-5361 only I can acces with serial port.

root@OpenWrt:/rom/etc/config# firstboot
Unlocking rootfs_data ...
Erasing rootfs_data ...
[ 8750.516000] jffs2: Too few erase blocks (4)

dmesg

[    0.300000] bcm963xx_flash: Read Signature value of CFE1CFE1
[    0.304000] bcm963xx-flash bcm963xx-flash.0: CFE bootloader detected
[    0.312000] bcm963xx_flash: CFE boot tag found with version 6 and board type 96348GW-11
[    0.320000] bcm963xx_flash: Partition 0 is CFE offset 0 and length 10000
[    0.328000] bcm963xx_flash: Partition 1 is kernel offset 10100 and length dff00
[    0.336000] bcm963xx_flash: Partition 2 is rootfs offset f0000 and length 300000
[    0.340000] bcm963xx_flash: Partition 3 is nvram offset 3f0000 and length 10000
[    0.348000] bcm963xx_flash: Partition 4 is linux offset 10000 and length 3e0000
[    0.356000] bcm963xx_flash: Spare partition is 3c0000 offset and length 30000
[    0.364000] Creating 5 MTD partitions on "bcm963xx":
[    0.368000] 0x000000000000-0x000000010000 : "CFE"
[    0.380000] 0x000000010100-0x0000000f0000 : "kernel"
[    0.384000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.404000] 0x0000000f0000-0x0000003f0000 : "rootfs"
[    0.416000] mtd: partition "rootfs" set to be root filesystem
[    0.420000] mtd: partition "rootfs_data" created automatically, ofs=3B0000, len=40000
[    0.428000] 0x0000003b0000-0x0000003f0000 : "rootfs_data"
[    0.440000] 0x0000003f0000-0x000000400000 : "nvram"
[    0.452000] 0x000000010000-0x0000003f0000 : "linux"
...
...

The flash size is 4Mb and imagefile openwrt-96348GW-11-gen-squashfs-cfe.bin is 3.713 Kb.
That I see is (may be wrong):
squashfs size is "rootfs" + "kernel" = 3dff00 h = 3967Kb minus overlay
Then overlay jffs2 (rootfs_data) is created with the rest of size: 40000 = 256Kb
3967kb - 256Kb = 3711 Kb (and my file is 3713Kb) -> may be the problem is only 3Kb??

So, what's the problem? may be overlay it's too big? How many "blocks" is needed on overlay partition?

Thanks:
Al9

The discussion might have continued from here.