I got the router yesterday so no I don't understand much yet on the device and how it's partitioned. My noobish assumptions
ubinfo -a
UBI version: 1
Count of UBI devices: 3
UBI control device major/minor: 10:62
Present UBI devices: ubi0, ubi1, ubi2
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: 175 (22220800 bytes, 21.1 MiB)
Maximum count of volumes 128
Count of bad physical eraseblocks: 0
Count of reserved physical eraseblocks: 20
Current maximum erase counter value: 1
Minimum input/output unit size: 2048 bytes
Character device major/minor: 250:0
Present volumes: 0, 1, 2
Volume ID: 0 (on ubi0)
Type: static
Alignment: 1
Size: 6 LEBs (761856 bytes, 744.0 KiB)
Data bytes: 747152 bytes (729.6 KiB)
State: OK
Name: uboot
Character device major/minor: 250:1
-----------------------------------
Volume ID: 1 (on ubi0)
Type: static
Alignment: 1
Size: 26 LEBs (3301376 bytes, 3.1 MiB)
Data bytes: 3215992 bytes (3.0 MiB)
State: OK
Name: kernel
Character device major/minor: 250:2
-----------------------------------
Volume ID: 2 (on ubi0)
Type: static
Alignment: 1
Size: 169 LEBs (21458944 bytes, 20.4 MiB)
Data bytes: 21450752 bytes (20.4 MiB)
State: OK
Name: rootfs
Character device major/minor: 250:3
===================================
ubi1
Volumes count: 1
Logical eraseblock size: 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks: 32 (4063232 bytes, 3.8 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: 10
Current maximum erase counter value: 3
Minimum input/output unit size: 2048 bytes
Character device major/minor: 249:0
Present volumes: 0
Volume ID: 0 (on ubi1)
Type: dynamic
Alignment: 1
Size: 18 LEBs (2285568 bytes, 2.1 MiB)
State: OK
Name: tp_data
Character device major/minor: 249:1
===================================
ubi2
Volumes count: 2
Logical eraseblock size: 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks: 64 (8126464 bytes, 7.7 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: 4
Minimum input/output unit size: 2048 bytes
Character device major/minor: 248:0
Present volumes: 0, 1
Volume ID: 0 (on ubi2)
Type: dynamic
Alignment: 1
Size: 20 LEBs (2539520 bytes, 2.4 MiB)
State: OK
Name: user_data1
Character device major/minor: 248:1
-----------------------------------
Volume ID: 1 (on ubi2)
Type: dynamic
Alignment: 1
Size: 20 LEBs (2539520 bytes, 2.4 MiB)
State: OK
Name: user_data2
Character device major/minor: 248:2
It seems that mtd:ubi0 includes 3 logical partitions
uboot
: 744 KB, static.kernel
: 3.1 MB, static.rootfs
: 20.4 MB, static.
So where are the extra ~20MB? why not include them in rootfs
In the same logic mtd:ubi1 includes 1 partition
tp_data
: 2.1 MB, dynamic.
But mtd:ubi1 is 50MB in size.
So why don't we
- resize ubi1 to 10-20MB for tp_data and extend ubi0
- add to rootfs the available ~20MB + the space gained from resized partitions
I am really not the guy that clearly understands/knows the way to do it...but I am happy to help with my guinea pig router.
And please correct me if I understand something wrong.
+1 more question but what is the OpenWRT U-boot layout installation method?
-----EXTRA-----
I followed the OpenWRT U-boot layout installation method. The files needed to follow this method are only available for 24.10.X version.
It seems that this method changes the partitions on the device, which is totally fine by me, OpenWRT is my only choice and the reason I bought this router on a great Amazon offer.
After completing the installation now my storage is 97.10MB which solves all my problems. Sorry for the trouble...but still if anyone can clear things out for me regarding the device partitioning I would like to get that knowledge. I usually do that stuff through a UI tool (e.g. gparted) and I am missing much especially on how embedded devices partitioning works.