Not all the available router board flash is utilised! (Linksys-EA7500v2)

I do own a Linksys-EA7500v2 series router which is very similar to the Linksys-EA7300 and Linksys-EA8100 series routers.
They all come with MT7621 core cpu.
As I understood they have 128MB of internal flash storage and dual boot option.

As I flashed the OpenWRT 22.03.4 on the router (Both First Factory Flash image and then Sysupgrade image 22.03.4) on the router none of them could recognize more than 20MB of storage space.

That said I want to know is there any way to increase and utilise the unused flash storage without need to build my custom OpenWRT image?

If so what happens if I re-flash the router? Does it recognise the the old expanded partition or not?

What happens to the DualBoot partitions if I expand the flash storage? Does it get overwritten by flashing?

To be clear, are you saying that you wish to get rid of dual boot in order to expand the usable flash space?

So your question is you have a router with supposedly 128MB of flash, but when you install OpenWrt, you only get 20MB free of flash? what did you install, the target image or the snapshot?

@feliciano I have first flasshed the OpenWRT Factory image, then the Target image not the Snapshot.

Usable flash is 2*(4+36) MB, minus ECC reserve for ubi.

2 Likes

@lleachii
Dual boot is a nice feature but, please correct me if I am wrong, currently there are two Firmwares installed on the router I persume the first firmware which is Linksys original bundled firmware that is installed on Partition #1 maybe I guess it is the very same size of around 30MB and the Partition #2 is the partition that the OpenWRT is installed.

I would like to have either of following configurations,
Configuration #1:
Partition #1 intact (Linksys), and Parition #2 uses the rest of the unused flash (OpenWRT).

Configuration #2:
Partition #1 should have OpenWRT 1 (with 50MB storage size) and Partition #2 should have OpenWRT2 (with 50MB storage size).

I want the possibility for DualBoot for both configurations.
I am wondering which one of the configurations are feasible and what steps should I follow to acheive either of the configurations.

OpenWrt will not touch the original partitioning (unless it's perfectly safe and can be re-created by flashing an OEM image 'easily').

@slh you means the OpenWRT image will let the rest of the flash storage get wasted.

If that is not possible via OpenWRT image how about bash commands
to expand the size of the OpenWRT partition?

Partition usage goes in round-robin fashion foir both OpenWrt and OEM firmware. Next time when you use OpenWrt to flash a new firmware, it will overwrite the other partition (currently Linksys firmware) and toggle booting to happen from that. Thre current one remains as a safe known-good fallback partition in the dual boot scheme.

How about recompiling OpenWrt from sources with the kernel and rootfs tailored in DTS source code to your specifications...

With flash partition, it is not about a traditional partition table. Partition table is included in each firmware image. Changes can't be done with bash.

Kernel size for dual boot was done e.g. with https://github.com/openwrt/openwrt/commit/0dbe754e4328e1ade02b29f25f0ebc633305d5bb and https://github.com/openwrt/openwrt/commit/15309f5133d55e92bec3ed91dfb3ac9d124f6a96 but those did not touch the placement of the dual sections, just the split of (kernel and rootfs) in each dual part.

Both your choices #1 and #2 should be doable, but require you to hack the code correctly, compile, flash (factory image), and see you bricked it.

Ps. Note that in sysupgrade flashing, flashing of kernel happens separately according to currently running DTS partition table and rootfs similarly separately. If you want to move the partitions, you need to avoid that by compiling a factory image that gets flashed at one run.

1 Like