ZyXEL NWA50AX Pro only 30MB usable Flash

The ZyXEL NWA50AX Pro has 256MB of NAND flash. After flashing OpenWRT, I can only use 30MB of NAND. Is this normal, or can it be changed?

root@OpenWrt:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 4.3M      4.3M         0 100% /rom
tmpfs                   243.6M     44.0K    243.6M   0% /tmp
/dev/ubi0_2              30.6M     56.0K     28.9M   0% /overlay
overlayfs:/overlay       30.6M     56.0K     28.9M   0% /
tmpfs                   512.0K         0    512.0K   0% /dev

You are looking at wrong screen :wink:

Check

cat /proc/mtd
ubinfo -a

probably there is some vendor partition in ubi for eventual rollback to OEM fw.

So far I know the NWA50AX Pro has a two partition layout, but how can I check/use this?

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "BL2"
mtd1: 00080000 00020000 "u-boot-env"
mtd2: 00200000 00020000 "Factory"
mtd3: 00200000 00020000 "FIP"
mtd4: 03200000 00020000 "ubi"
mtd5: 03200000 00020000 "ubi_1"
mtd6: 03c00000 00020000 "rootfs-data"
mtd7: 03a80000 00020000 "logs"
mtd8: 00f00000 00020000 "myzyxel"
mtd9: 00080000 00020000 "bootconfig"
mtd10: 00080000 00020000 "mrd"
root@OpenWrt:/# ubinfo -a
UBI version:                    1
Count of UBI devices:           1
UBI control device major/minor: 10:127
Present UBI devices:            ubi0

ubi0
Volumes count:                           3
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     400 (50790400 bytes, 48.4 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  38
Current maximum erase counter value:     3
Minimum input/output unit size:          2048 bytes
Character device major/minor:            249:0
Present volumes:                         0, 1, 2

Volume ID:   0 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        31 LEBs (3936256 bytes, 3.7 MiB)
State:       OK
Name:        kernel
Character device major/minor: 249:1
-----------------------------------
Volume ID:   1 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        35 LEBs (4444160 bytes, 4.2 MiB)
State:       OK
Name:        rootfs
Character device major/minor: 249:2
-----------------------------------
Volume ID:   2 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        290 LEBs (36823040 bytes, 35.1 MiB)
State:       OK
Name:        rootfs_data
Character device major/minor: 249:3
root@OpenWrt:/#

Modern devices almost always use a/b dual-firmware booting, so your flash is already split in half from the get-go. Additionally vendors tend to reserve considerable amounts of space for other partitions (beyond the basics of bootloader, bootloader environment, and wifi calibration - shared resources like download space for i18n and other things come to mind, scratch space, streamboost was popular ages ago, etc.).

Your device is partitioned for two (a/b) 50 MB ubi partitions for the actual firmware, ubiinfo will tell you about the ubi volumes within those - but that's well in line with expectations with the ~36 MB (keep in mind to add the OpenWrt image size (I just pulled 8 MB as example out of the hat, without checking) to the overlay size - and keep space for ECC in mind)). So basically all as expected and pretty similar to other devices - depending on the vendor you may see anything from 15-100 MB useable space with 256 MB NAND devices.

I understand, so I can only see how much NAND I can use after installing OpenWrt. This makes choosing the right hardware difficult.

Thank you a lot

You have few devices with OpenWrt u-boot where you can partition ubi easily, like one partition for recovery other for normal boot.
For this - you never know how oem bootloader does with repartitioning, if you are into soldering ttl pins you can try. (ubi0 and ubi1 are adjacent, should be easy after you have that console soldered)

With SPI-NOR flash you can typically find that figure exactly, with NAND you only get an upper limit (ubi partition size, but there are multiple ubi volume within that partition). If you're lucky device page/ bootlogs or forum posts (such as this one) may provide more exact pointers.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.