[Solved] WRT1200AC rolling back from custom image -- low on flash


I played around a little bit with LEDE's features and built custom images but I decided
to roll back to updates provided by the LEDE developers.

Unfortunately rolling back is not as easy as I thought. Everything seems to be fine except my flash memory. It dropped to about 23 MB, so only a fraction of the original flash size.

My disk space currently looks like this

root@LEDE:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.8M      2.8M         0 100% /rom
tmpfs                   250.8M    920.0K    249.9M   0% /tmp
/dev/ubi0_1              23.5M    700.0K     21.6M   3% /overlay
overlayfs:/overlay       23.5M    700.0K     21.6M   3% /
ubi1:syscfg              29.6M    336.0K     27.7M   1% /tmp/syscfg
tmpfs                   512.0K         0    512.0K   0% /dev

And I used this handy luci plugin to have a look at the alternative router partition but this looks identically than that one shown above. On both partitions seem to be the same LEDE images.

I have absolutely no clue how to fix this. My last idea is to go to OEM and back to LEDE and hope the error resolves by itself but I'm not sure if this is the way to go and a little bit scared to brick my router ... again.

So do you know a better solution for this problem? And why do I have a lack of flash memory at all?

Thats probably expected due to how stock layout looks like (openwrt simply follows it). My wrt1900acv1 flash layout looks like this:

root@WRT1900ACv1:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00040000 00020000 "u_env"
mtd2: 00040000 00020000 "s_env"
mtd3: 00100000 00020000 "devinfo"
mtd4: 02800000 00020000 "kernel1"
mtd5: 02500000 00020000 "rootfs1"
mtd6: 02800000 00020000 "kernel2"
mtd7: 02500000 00020000 "ubi"
mtd8: 02600000 00020000 "syscfg"
mtd9: 00780000 00020000 "unused_area"
mtd10: 00008000 00008000 "spi0.0"

You can try the same command and see.

The amount of space shown is correct... See Flash Layout in the WRT AC Series wiki.

  • mtd5 & mtd7 (primary and alternate) are 34MB in size, with the root fs [firmware image] being ~10MB in size.
    • /overlay's total size is the the size of mtd5/mtd7, minus the root fs size.
    • /overlay's available size goes down as configs are customized and packages installed.

Ah everything makes sense now.
Thank you for your clarifications and your quick replies!