Linksys ea3500 64MB rom, only 9MB free after lede

I bought the EA3500 in part because of the generous 64MB ROM, but after flashing lede I see that only 9MB is free. I suppose the backup kernel partition and a large number of bad erase blocks could reduce the amount of free space, but 9MB out of 64MB seems a tad low... I was wondering if anyone else with this router has any advice.

Only minor part of the flash is reserved for each partition:
https://wiki.openwrt.org/toh/linksys/ea3500#flash_layout

quite much is reserved for unused "syscfg" partition

1 Like

So is there an OpenWrt standard way of making use of the additional ~16MB of remaining storage in the "syscfg" partition?

SSH into the router and run the following...

cat /proc/meminfo

top

here's what I get from /proc/meminfo:

root@gatengruven:~# cat /proc/meminfo 
MemTotal:          59748 kB
MemFree:           35768 kB
MemAvailable:      30156 kB
Buffers:            1864 kB
Cached:             4964 kB
SwapCached:            0 kB
Active:             7420 kB
Inactive:           1328 kB
Active(anon):       1956 kB
Inactive(anon):       48 kB
Active(file):       5464 kB
Inactive(file):     1280 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          1928 kB
Mapped:             2032 kB
Shmem:                84 kB
Slab:               7168 kB
SReclaimable:       2512 kB
SUnreclaim:         4656 kB
KernelStack:         464 kB
PageTables:          420 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       29872 kB
Committed_AS:       6076 kB
VmallocTotal:     966656 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB

and top:

Mem: 24012K used, 35736K free, 84K shrd, 1864K buff, 4964K cached
CPU:   0% usr   9% sys   0% nic  81% idle   0% io   0% irq   9% sirq
Load average: 0.00 0.00 0.00 1/58 2557
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
 1835     1 root     S     1576   3%   0% /sbin/netifd
    1     0 root     S     1388   2%   0% /sbin/procd
 1917     1 root     S     1376   2%   0% /usr/sbin/uhttpd -f -h /www -r gateng
 1788     1 root     S     1300   2%   0% /sbin/rpcd
 1858     1 root     S     1268   2%   0% /usr/sbin/odhcpd
 2220  2214 root     S     1112   2%   0% top
 2211  2203 root     S     1112   2%   0% top
 2201  2186 root     S     1112   2%   0% top
 2012     1 root     S <   1112   2%   0% /usr/sbin/ntpd -n -N -S /usr/sbin/ntp
 2214  2213 root     S     1112   2%   0% -ash
 2550  2549 root     S     1112   2%   0% -ash
 2557  2550 root     R     1112   2%   0% top
 2222  2221 root     S     1112   2%   0% -ash
 2186  2185 root     S     1112   2%   0% -ash
 2203  2202 root     S     1112   2%   0% -ash
 2010  1835 root     S     1080   2%   0% /usr/sbin/pppd nodetach ipparam wan i
 1779     1 root     S     1064   2%   0% /sbin/logd -S 64
 1576     1 root     S     1024   2%   0% /sbin/ubusd
 2185  1895 root     S      940   2%   0% /usr/sbin/dropbear -F -P /var/run/dro
^C202  1895 root     S      940   2%   0% /usr/sbin/dropbear -F -P /var/run/dro

however, I'm thinking what might be more revealing is df -h:

Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    29.2M     84.0K     29.1M   0% /tmp
/dev/ubi0_1               9.8M     84.0K      9.0M   1% /overlay
overlayfs:/overlay        9.8M     84.0K      9.0M   1% /
tmpfs                   512.0K         0    512.0K   0% /dev

and the ubi device info from dmesg:

nand: device found, Manufacturer ID: 0xad, Chip ID: 0x76
[    0.784598] nand: Hynix NAND 64MiB 3,3V 8-bit
[    0.789007] nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[    0.796361] Scanning device for bad blocks
[    1.240250] mtd: bad character after partition (f)
[    1.245100] 8 ofpart partitions found on MTD device orion_nand
[    1.250982] Creating 8 MTD partitions on "orion_nand":
[    1.256146] 0x000000000000-0x000000080000 : "u-boot"
[    1.263293] 0x000000080000-0x000000084000 : "u_env"
[    1.269656] 0x000000084000-0x000000088000 : "s_env"
[    1.275932] 0x000000200000-0x000001600000 : "kernel1"
[    1.282892] 0x000000490000-0x000001600000 : "ubi"
[    1.289463] 0x000001600000-0x000002a00000 : "kernel2"
[    1.296405] 0x000001890000-0x000002a00000 : "rootfs2"
[    1.303309] 0x000002a00000-0x000004000000 : "syscfg"

and here's the UBIFS layout with only 13MiB for rootfs:

[    6.423625] UBIFS (ubi0:1): recovery needed
[    6.428101] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 993
[    6.465010] UBIFS (ubi0:1): recovery completed
[    6.469588] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[    6.477463] UBIFS (ubi0:1): LEB size: 15872 bytes (15 KiB), min./max. I/O unit sizes: 512 bytes/512 bytes
[    6.487166] UBIFS (ubi0:1): FS size: 13919744 bytes (13 MiB, 877 LEBs), journal size 698368 bytes (0 MiB, 44 LEBs)
[    6.497581] UBIFS (ubi0:1): reserved for root: 657463 bytes (642 KiB)
[    6.504080] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID 58E3E126-FC11-447D-A994-C8C093021365, small LPT model
[    6.519122] mount_root: switching to ubifs overlay

How would that RAM usage be related to taking the remaining flash space (of the "syscfg" partition) into use?

@razholio @RaylynnKnight
There is no standard way to take that into use.
On some double-firmware routers, like WRT1900AX series, the syscfg partition is mounted for the sysupgrade config purposes, so the partition is available as normal storage space.

See lines 14, 23 and 24 for commands how that is done for mvebu routers:

But I am not sure how that partition is formatted on EA3500 and if it can be mounted as easily as in mvebu routers.

It might be as simple as below, (assuming syscfg = mtd7)

mkdir /tmp/syscfg
ubiattach -m 7
mount -t ubifs ubi1:syscfg /tmp/syscfg

But you will need to check the output of "cat /proc/mtd" to see the correct numbering of the mtd devices.

NOTE: The contents of the syscfg may be important for the OEM firmware if you ever want to return into that. So, you might need to make a backup dump of those contents before removing the possible files there.

It isn't.

Moving too fast and misread the post.

Sorry for the confusion

Thanks. I've decided against risking any of the mtd partitions after going through the USB ext root guide and now fully understanding how that works. I think that's the easy solution for anyone else facing this problem. If you have a router of at least 8MB flash and USB, then you can install all the requirements for ext root and easily add a thumbdrive to provide gobs of extra storage in root and so long as you make all the required configurations prior to extroot, then your router will function w/ or w/o the extra storage. I picked up a couple 16GB cruzer fits for 7bucks ea and will use those to provide more storage than I'll ever need on my routers.

I was just about to order an EA3500, partly because I thought the 64/64 ram/flash spec was enticing, and would help future-proof my firewall. But then I found this thread, and now I'm not so sure. How much flash should a router have these days, to be comfortable for many years running openwrt/lede? I'm replacing a WRT54G -- I should have done it a few years ago, but still -- you can see that when I say "many years", I really mean it. :wink:

I've submitted a PR to expand internal storage for EA3500/EA4500 & external for all. Appreciate you all's review and comments.