WRT1900 and MTD and UBI and Mounting NonVolatile Flash
All of the below notes are based on a WRT1900ACS device, with OpenWRT 24.10.5, in early 2026. Adjust to your own environment
...start here, to get some information: ubinfo
ubinfo
UBI version: 1
Count of UBI devices: 3
UBI control device major/minor: 10:256
Present UBI devices: ubi0, ubi1, ubi2And maybe some more info about a specific device: ubinfo -d 2
ubi2
Volumes count: 2
Logical eraseblock size: 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks: 272 (34537472 bytes, 32.9 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: 20
Current maximum erase counter value: 3
Minimum input/output unit size: 2048 bytes
Character device major/minor: 244:0
Present volumes: 0, 1Oh, better yet, some more information: ubinfo -d 2 -n 0
Volume ID: 0 (on ubi2)
Type: dynamic
Alignment: 1
Size: 58 LEBs (7364608 bytes, 7.0 MiB)
State: OK
Name: rootfs
Character device major/minor: 244:1Wait! What allowed for that above "-d 2" to be attached? This is the command: ubiattach -m 7 -d 2
Why "-m 7"? For a WRT1900ACS, just look up the documentation: https://openwrt.org/toh/linksys/wrt1900acs
| Layer 0 | raw flash
128 MiB | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Layer 1 | mtd0
|
mtd1
|
mtd2
|
mtd3
|
firmware
80 MiB |
mtd8
|
mtd9
| |||
| Layer 2 | mtd4
|
mtd6
| ||||||||
| Layer 3 | primary
kernel image 6 MiB |
mtd5
|
alternate
kernel image 6 MiB |
mtd7
| ||||||
What about what's in /dev?: ls -la /dev
Don't try this: mount -t ubifs ubi2:rootfs /tmp/ubi2
Why? Well, it's a SquashFS File System, so try this instead: mount -t squashfs /dev/ubiblock2_0 /tmp/ubi2
* And don't forget to do this first: mkdir /tmp/ubi2