Resize nand Linksys EA6500v2

Hello.

I bought the Linksys EA6500v2, but I don't no why appear only 14MB from Storage/disk space.

After some steps to change CFE values, now I'm able to run and store the system (before, all reboots, goes to factory oem Linksys firmware), but the problem is disk space.

I'm using last distro: OpenWrt 23.05.5 r24106-10cc5fcd00 / LuCI openwrt-23.05 branch git-24.264.56413-c7a3562

See what appears now:

root@OpenWrt_LINKSYS_EA6500V2:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.5M      3.5M         0 100% /rom
tmpfs                   122.3M      1.2M    121.1M   1% /tmp
/dev/ubi0_1              14.7M    252.0K     13.6M   2% /overlay
overlayfs:/overlay       14.7M    252.0K     13.6M   2% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt_LINKSYS_EA6500V2:~#
root@OpenWrt_LINKSYS_EA6500V2:/# free
              total        used        free      shared  buff/cache   available
Mem:         250500       35572      202348          92       12580      170808
Swap:             0           0           0
root@OpenWrt_LINKSYS_EA6500V2:/#

nand:

[    0.568672] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
[    0.575066] nand: AMD/Spansion S34ML01G1
[    0.578977] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.586541] iproc_nand 18028000.nand-controller: detected 128MiB total, 128KiB blocks, 2KiB pages, 16B OOB, 8-bit, BCH-8
[    0.597415] Scanning device for bad blocks
[    1.065503] random: crng init done
[    1.413380] Bad eraseblock 732 at 0x000005b80000
[    2.366487] 4 bcm47xxpart partitions found on MTD device brcmnand.0
[    2.372747] Creating 4 MTD partitions on "brcmnand.0":
[    2.377879] 0x000000000000-0x000000080000 : "boot"
[    2.383470] 0x000000080000-0x000000200000 : "nvram"
[    2.389183] 0x000000200000-0x000001f00000 : "firmware"
[    2.396020] 2 trx partitions found on MTD device firmware
[    2.401413] Creating 2 MTD partitions on "firmware":
[    2.406398] 0x00000000001c-0x000000400000 : "linux"
[    2.411262] mtd: partition "linux" doesn't start on an erase/write block boundary -- force read-only
[    2.421241] 0x000000400000-0x000001d00000 : "ubi"
[    2.426869] 0x000001f00000-0x000008000000 : "failsafe"
[    3.965817] UBI: auto-attach mtd4
[    3.969138] ubi0: attaching mtd4
[    4.135235] ubi0: scanning is finished
[    4.149423] ubi0: attached mtd4 (name "ubi", size 25 MiB)
[    4.154864] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    4.161716] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    4.168482] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    4.175429] ubi0: good PEBs: 200, bad PEBs: 0, corrupted PEBs: 0
[    4.181407] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    4.188602] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1727094886
[    4.197700] ubi0: available PEBs: 0, total reserved PEBs: 200, PEBs reserved for bad PEB handling: 20
[    4.206936] ubi0: background thread "ubi_bgt0d" started, PID 308
[    4.213976] block ubiblock0_0: created from ubi0:0(rootfs)
[    4.219514] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    4.226668] clk: Disabling unused clocks
[    6.474156] mtdblock: MTD device 'nvram' is NAND, please consider using UBI block devices instead.
[    6.816935] mtdblock: MTD device 'nvram' is NAND, please consider using UBI block devices instead.
[    7.314162] b53-srab-switch 18007000.ethernet-switch lan1: configuring for phy/gmii link mode
[    7.322751] bgmac_bcma bcma0:3 eth0: Link is Up - 1Gbps/Full - flow control off
[    7.330251] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.331719] b53-srab-switch 18007000.ethernet-switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[    7.337435] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    9.581105] UBIFS (ubi0:1): Mounting in unauthenticated mode
[    9.586962] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 471
[    9.638614] UBIFS (ubi0:1): recovery needed
[    9.761621] UBIFS (ubi0:1): recovery completed
[    9.766190] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[    9.774027] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    9.783909] UBIFS (ubi0:1): FS size: 17395712 bytes (16 MiB, 137 LEBs), max 147 LEBs, journal size 1015809 bytes (0 MiB, 7 LEBs)
[    9.795446] UBIFS (ubi0:1): reserved for root: 821641 bytes (802 KiB)
[    9.801871] UBIFS (ubi0:1): media format: w5/r0 (latest is w5/r0), UUID A12528D1-A2E2-4000-848D-6FB0A7C4AD82, small LPT model
[    9.818108] mount_root: switching to ubifs overlay
[    9.834896] urandom-seed: Seeding with /etc/urandom.seed
root@OpenWrt_LINKSYS_EA6500V2:/# nvram show | grep board | sort
[  177.532273] mtdblock: MTD device 'nvram' is NAND, please consider using UBI block devices instead.
0:boardflags2=0x00100000
0:boardflags3=0x00000003
0:boardflags=0x80001200
1:boardflags2=0x00200002
1:boardflags3=0x00000000
1:boardflags=0x30000000
boardflags2=0x00000000
boardflags=0x00000110
boardnum=01
boardrev=0x1100
boardtype=0xF646
root@OpenWrt_LINKSYS_EA6500V2:/#

dd-wrt show:

root@DD-WRT:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                24.8M     24.8M         0 100% /
none                    512.0K         0    512.0K   0% /dev
root@DD-WRT:~#

Current CFE (MAC and SECRET: xxx for my values):

boardtype=0xF646
boardnum=01
boardrev=0x1100
boardflags=0x00000110
boardflags2=0x00000000
sromrev=8
clkfreq=800,666
xtalfreq=25000
sdram_config=0x0147
et0phyaddr=30
et0mdcport=0
et0macaddr=48:F8:B3:xx:xx:xx
vlan1ports=0 1 2 3 5*
vlan1hwname=et0
vlan2ports=4 5u
vlan2hwname=et0
landevs=vlan1 wl0 wl1
wandevs=et0
lan_ipaddr=192.168.1.1
lan_netmask=255.255.255.0
gpio7=wps_button
boot_wait=off
wait_time=1
reset_gpio=11
gpio9=usbport1
gpio10=usbport2
watchdog=0
devpath0=pci/1/1
0:venid=0x14E4
0:sromrev=11
0:boardflags=0x80001200
0:boardflags2=0x00100000
0:boardflags3=0x00000003
0:xtalfreq=40000
0:devid=0x4332
0:macaddr=48:F8:B3:xx:xx:xx
0:aa2g=7
0:agbg0=0x47
0:agbg1=0x47
0:agbg2=0x47
0:txchain=7
0:rxchain=7
0:antswitch=0
0:femctrl=3
0:gainctrlsph=0
0:papdcap2g=0
0:tworangetssi2g=0
0:pdgain2g=14
0:epagain2g=0
0:tssiposslope2g=1
0:pdoffset2g40ma0=3
0:pdoffset2g40ma1=3
0:pdoffset2g40ma2=3
0:parefldovoltage=35
0:rxgains2gelnagaina0=4
0:rxgains2gelnagaina1=4
0:rxgains2gelnagaina2=4
0:rxgains2gtrelnabypa0=1
0:rxgains2gtrelnabypa1=1
0:rxgains2gtrelnabypa2=1
0:rxgains2gtrisoa0=7
0:rxgains2gtrisoa1=7
0:rxgains2gtrisoa2=7
0:maxp2ga0=0x62
0:maxp2ga1=0x62
0:maxp2ga2=0x62
0:pa2ga0=0xff22,0x1a4f,0xfcc1
0:pa2ga1=0xff22,0x1a71,0xfcbb
0:pa2ga2=0xff1f,0x1a21,0xfcc2
0:cckbw202gpo=0
0:cckbw20ul2gpo=0
0:mcsbw202gpo=0xCC666600
0:mcsbw402gpo=0xCC666600
0:dot11agofdmhrbw202gpo=0x6666
0:ofdmlrbw202gpo=0
0:sb20in40hrpo=0
0:sb20in40lrpo=0
0:dot11agduphrpo=0
0:dot11agduplrpo=0
0:rpcal2g=53985
0:ledbh10=2
0:ccode=#a
0:regrev=0
0:temps_period=5
0:tempthresh=120
0:temps_hysteresis=5
0:phycal_tempdelta=0
0:tempoffset=0
devpath1=pci/2/1
1:venid=0x14E4
1:sromrev=11
1:boardflags=0x30000000
1:boardflags2=0x00200002
1:boardflags3=0x00000000
1:xtalfreq=40000
1:devid=0x43A2
1:macaddr=48:F8:B3:xx:xx:xx
1:aa5g=7
1:aga0=0
1:aga1=0
1:aga2=0
1:txchain=7
1:rxchain=7
1:antswitch=0
1:femctrl=3
1:subband5gver=4
1:gainctrlsph=0
1:papdcap5g=0
1:tworangetssi5g=0
1:pdgain5g=4
1:epagain5g=0
1:tssiposslope5g=1
1:parefldovoltage=35
1:rxgains5gelnagaina0=1
1:rxgains5gelnagaina1=1
1:rxgains5gelnagaina2=1
1:rxgains5ghelnagaina0=2
1:rxgains5ghelnagaina1=2
1:rxgains5ghelnagaina2=3
1:rxgains5ghtrelnabypa0=1
1:rxgains5ghtrelnabypa1=1
1:rxgains5ghtrelnabypa2=1
1:rxgains5ghtrisoa0=5
1:rxgains5ghtrisoa1=4
1:rxgains5ghtrisoa2=4
1:rxgains5gmelnagaina0=2
1:rxgains5gmelnagaina1=2
1:rxgains5gmelnagaina2=3
1:rxgains5gmtrelnabypa0=1
1:rxgains5gmtrelnabypa1=1
1:rxgains5gmtrelnabypa2=1
1:rxgains5gmtrisoa0=5
1:rxgains5gmtrisoa1=4
1:rxgains5gmtrisoa2=4
1:rxgains5gtrelnabypa0=1
1:rxgains5gtrelnabypa1=1
1:rxgains5gtrelnabypa2=1
1:rxgains5gtrisoa0=7
1:rxgains5gtrisoa1=6
1:rxgains5gtrisoa2=5
1:maxp5ga0=0x5C,0x5C,0x5C,0x5C
1:maxp5ga1=0x5C,0x5C,0x5C,0x5C
1:maxp5ga2=0x5C,0x5C,0x5C,0x5C
1:pa5ga0=0xff2e,0x185a,0xfcfc,0xff37,0x1903,0xfcf1,0xff4b,0x197f,0xfcff,0xff37,0x180f,0xfd12
1:pa5ga1=0xff33,0x1944,0xfce5,0xff30,0x18c6,0xfcf5,0xff40,0x19c7,0xfce5,0xff38,0x18cc,0xfcf9
1:pa5ga2=0xff34,0x1962,0xfce1,0xff35,0x193b,0xfceb,0xff38,0x1921,0xfcf1,0xff39,0x188f,0xfd00
1:pdoffset40ma0=0x1111
1:pdoffset40ma1=0x1111
1:pdoffset40ma2=0x1111
1:pdoffset80ma0=0xEEEE
1:pdoffset80ma1=0xEEEE
1:pdoffset80ma2=0xEEEE
1:mcsbw205ghpo=0xBB555500
1:mcsbw205glpo=0xBB555500
1:mcsbw205gmpo=0xBB555500
1:mcsbw405ghpo=0xBB777700
1:mcsbw405glpo=0xBB777700
1:mcsbw405gmpo=0xBB777700
1:mcsbw805ghpo=0xBB777700
1:mcsbw805glpo=0xBB777733
1:mcsbw805gmpo=0xBB777700
1:mcslr5ghpo=0
1:mcslr5glpo=0
1:mcslr5gmpo=0
1:sb20in40hrpo=0
1:sb20in40lrpo=0
1:sb20in80and160hr5ghpo=0
1:sb20in80and160hr5glpo=0
1:sb20in80and160hr5gmpo=0
1:sb20in80and160lr5ghpo=0
1:sb20in80and160lr5glpo=0
1:sb20in80and160lr5gmpo=0
1:sb40and80hr5ghpo=0
1:sb40and80hr5glpo=0
1:sb40and80hr5gmpo=0
1:sb40and80lr5ghpo=0
1:sb40and80lr5glpo=0
1:sb40and80lr5gmpo=0
1:dot11agduphrpo=0
1:dot11agduplrpo=0
1:rpcal5gb0=41773
1:rpcal5gb3=42547
1:ledbh10=2
1:ccode=#a
1:regrev=0
1:temps_period=5
1:tempthresh=120
1:temps_hysteresis=5
1:phycal_tempdelta=0
1:tempoffset=0
bl_version=1.0.2.1
bootflags=1
nospare=1
secret_code=7xxxxxxx
odmpid=LINKSYS
model=EA6500

Actually, I have this layout, but I don't know how to change/resize:

The problem is /dev/ubi0-1 (/overlay)

root@OpenWrt_LINKSYS_EA6500V2:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.5M      3.5M         0 100% /rom
tmpfs                   122.3M     88.0K    122.2M   0% /tmp
/dev/ubi0_1              14.7M    168.0K     13.7M   1% /overlay
overlayfs:/overlay       14.7M    168.0K     13.7M   1% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt_LINKSYS_EA6500V2:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00020000 "boot"
mtd1: 00180000 00020000 "nvram"
mtd2: 01d00000 00020000 "firmware"
mtd3: 003fffe4 00020000 "linux"
mtd4: 01900000 00020000 "ubi"
mtd5: 06100000 00020000 "failsafe"
root@OpenWrt_LINKSYS_EA6500V2:/#
root@OpenWrt_LINKSYS_EA6500V2:/# ubinfo -d 0 -N rootfs_data
Volume ID:   1 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        147 LEBs (18665472 bytes, 17.8 MiB)
State:       OK
Name:        rootfs_data
Character device major/minor: 251:2
root@OpenWrt_LINKSYS_EA6500V2:/#
root@OpenWrt_LINKSYS_EA6500V2:/# mount
/dev/root on /rom type squashfs (ro,relatime,errors=continue)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_1 on /overlay type ubifs (rw,noatime,assert=read-only,ubi=0,vol=1)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
bpffs on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
root@OpenWrt_LINKSYS_EA6500V2:/#

Now, current my Xiaomi Mi router 3G to compare:

root@OpenWrt_Mi_router_3G:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.8M      3.8M         0 100% /rom
tmpfs                   122.2M      3.6M    118.6M   3% /tmp
/dev/ubi0_1              97.2M     24.3M     68.2M  26% /overlay
overlayfs:/overlay       97.2M     24.3M     68.2M  26% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt_Mi_router_3G:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00020000 "Bootloader"
mtd1: 00040000 00020000 "Config"
mtd2: 00040000 00020000 "Bdata"
mtd3: 00040000 00020000 "factory"
mtd4: 00040000 00020000 "crash"
mtd5: 00040000 00020000 "crash_syslog"
mtd6: 00040000 00020000 "reserved0"
mtd7: 00400000 00020000 "kernel_stock"
mtd8: 00400000 00020000 "kernel"
mtd9: 07580000 00020000 "ubi"
root@OpenWrt_Mi_router_3G:~#

Full serial log here:

Same here using EA4500v1:

BusyBox v1.36.1 (2025-01-04 21:35:37 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 24.10.0-rc5, r28304-6dacba30a7
 -----------------------------------------------------
root@OpenWrt_LINKSYS_EA4500V1:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.8M      3.8M         0 100% /rom
tmpfs                    58.4M    256.0K     58.2M   0% /tmp
/dev/ubi0_1              13.2M     48.0K     12.4M   0% /overlay
overlayfs:/overlay       13.2M     48.0K     12.4M   0% /
tmpfs                   512.0K         0    512.0K   0% /dev

And

root@OpenWrt_LINKSYS_EA4500V1:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00020000 "u-boot"
mtd1: 00020000 00020000 "u_env"
mtd2: 00020000 00020000 "s_env"
mtd3: 01a00000 00020000 "kernel1"
mtd4: 01600000 00020000 "ubi"
mtd5: 01a00000 00020000 "kernel2"
mtd6: 01600000 00020000 "rootfs2"
mtd7: 04a00000 00020000 "syscfg"
mtd8: 00140000 00020000 "unused"
root@OpenWrt_LINKSYS_EA4500V1:~#

For EA4500v1, I just upgrade using web interface from stock firmware.

Both are dual boot systems so you loose half of your flash.

The EA6500 is Broadcom so because of the closed source Broadcom drivers not well supported on OpenWRT, but still well supported on e.g. DDWRT, I have an EA6900 which is similar and can be converted to a single boot system so with availability of all the flash, I have it in daily use it even has hardware offloading

1 Like

@egc I don't need dual boot. How to convert to single boot to use ALL flash space?

I need your help to show me the steps.

Many thanks.

Frank

Using DD-WRT is possible install IPK filés to internal memory? I tried TOMATO, but didn't like because install using external storage (/opt). The system is read only and I don't want this way.

You convert by changing the CFE, that is something which could permanently brick your router so be careful.
Instructions are on the DDWRT website and also on the Fresh Tomato website
You can search for ddwrt EA6900 install guide

You can use Entware to install additional packages,

Yes... I tried entware (TOMATO), but lose 1 USB Port and some packages don't work correctly.

For 6500v2, I have new cfe edited, but DD-WRT show only 24MB too.

Thx

For questions about DDWRT you better go to the DDWRT forum also very helpful people over there

Is better for me OpenWrt, because works ALL my packages and I don't have read only system. I have some routers here and I like this 6500v2 to use both USB ports.

Maybe changing CFE to single boot, I'll able to install OpenWrt instead DD-WRT?

I Just need the steps to delete second kernel and full space available. I have new_cfe, but nothing has chanced, except nvram.

If you want, please add my contact.

Thx

Using New CFE (mini web server) to install DD-WRT, appear only 24MB.

Previous posts

Here, solved by @builder my EA4500. I think is same for EA6500v2