If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.

0
U

Property:ubi

From BoxMatrix
(Redirected from ubi)


BoxMatrix >> System >> ubi @ BoxMatrix   -   IRC-Chat   -   Translate: de es fr it nl pl
News Selectors Models Accessories Components Environment Config Commands System Webif Software Develop Lexicon Community Project Media

Devices Filesystems Partitions Sockets Netlink Pipes Interfaces Bridges Ports Events Sources Sinks AVMIPC Processes Watchdogs Memory Slab Vmalloc ProcFS SysFS Research

Linux-Partition

Goto:   Dependencies   -   Model-Matrix   -   Missing Supportdata   -   SMW-Browser

Details

ubi is the mtd partition managed by the UBI volume manager on models containing it.
It is attached to the UBI manager at boot time which starts the background process ubi_bgt0d and the device ubi0.
Of course more UBI partitions would be possible but this is not used in FRITZ!OS in favor of UBI volumes.

From the 7530 fw 7.39 bootlog:

root@fritz:/var/mod/root# dmesg | grep 'ubi0: '

[    4.303419] ubi0: attaching mtd4
[    4.890009] ubi0: scanning is finished
[    4.901250] ubi0: attached mtd4 (name "ubi", size 109 MiB)
[    4.901301] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    4.906044] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    4.913136] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    4.920251] ubi0: good PEBs: 872, bad PEBs: 0, corrupted PEBs: 0
[    4.927279] ubi0: user volume: 4, internal volumes: 1, max. volumes count: 128
[    4.933446] ubi0: max/mean erase counter: 6/3, WL threshold: 4096, image sequence number: 2957383831
[    4.941086] ubi0: available PEBs: 0, total reserved PEBs: 872, PEBs reserved for bad PEB handling: 20
[    4.950326] ubi0: background thread "ubi_bgt0d" started, PID 96

UBI (Unsorted Block Images) is a volume manager especially designed for managing raw flash chips. It can manintain
an entire flash chip or just a partition of it, like FRITZ!OS uses it, The term unsorted means that all write accesses are spread
across the UBI managed section of flash in intelligent way to do wear leveling. Especially NAND flash is sensitive to frequent
writes on the same location and is aging fast then. Wear leveling distributes writes across the flash and slows down aging.
That is the reason why it's better to have one big UBI partition instead of multiple smaller ones.

UBI manages volumes, which behave like a partition from the outside but their data is spread unsorted but intelligent across
the UBI maintained portion of flash. Besides the wear leveling volumes have many advantages. They could be 'repartitioned'
at any time without changing the Bootloader-Environment. They could even shrink to compensate bad blocks on the flash.

Flash can not write a single byte at a specific location like RAM can do, it uses erase blocks, which are completely erased
to write the modified block back. UBI calls them PEB, physical erase blocks and abstracts them to logical erase blocks (LEBs)
A volume is a consecutive range of LEBs, which is mapped by UBI to an unsorted spread of PEBs. that's why a volume could
be treated like a partition, UBI manages the abstraction.

root@fritz1:/var/mod/root# ubinfo -d 0

ubi0
Volumes count:                           4
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     872 (110723072 bytes, 105.5 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:     2319
Minimum input/output unit size:          2048 bytes
Character device major/minor:            245:0
Present volumes:                         0, 1, 2, 3

You see the amount of good, bad and reserved PEBs and the LEBs and 4 volumes.
UBI creates a character device for each volume, in this case ubi0_0 to ubi0_3.
Let's see the names of the volumes stored:

root@fritz1:/var/mod/root# ubinfo -a | grep Name

Name:        avm_filesys_0
Name:        avm_filesys_1
Name:        avm_config
Name:        avm_userdata

The first 2 partitions do not really need wear leveling, they use read only squashfs and are only written by a Firmware-Update.
avm_userdata is mounted as Internal-Storage using ubifs and benefits from UBI's wear leveling.
Besides the devices all voumes get mtd partitions:

root@fritz1:/var/mod/root# cat /proc/mtd

dev:    size   erasesize  name
mtd0: 00400000 00020000 "reserved-kernel"
mtd1: 002c0000 00020000 "urlader"
mtd2: 00840000 00020000 "nand-tffs"
mtd3: 00400000 00020000 "kernel"
mtd4: 06d00000 00020000 "ubi"
mtd5: 02c14000 0001f000 "reserved-filesystem"
mtd6: 02c14000 0001f000 "filesystem"
mtd7: 0020f000 0001f000 "config"
mtd8: 00c79000 0001f000 "nand-filesystem"

mtd0 - mtd4 are physical partitions, mtd5 - mtd8 are UBI volumes.

Dependencies

Daily updated index of all dependencies of this partition. Last update: GMT.
A * in the Mod column marks info from Supportdata-Probes, which will always stay incomplete.
A ** in the Mod column marks info from Supportdata2 probes, which by their nature will stay way more incomplete.
A - in the Mod column marks manual research, the Firmware then shows where the item occurs, not the Relation.

Relation Typ Object Mod Firmware Info Origin
0 dependencies for this partition

Model-Matrix

Daily updated index of the presence, path and size of this partition for each model. Last update: 2024-11-22 07:03 GMT.
Showing all models using this partition. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom/rtl) label in the Model column shows which CPU is meant for Multi-Linux models.
Note that this list comes from Supportdata-Probes, which can have arbitrary settings and come from different firmware versions.
It doesn't say much if a model is not listed here. It may be a missing supportdata file or just a disabled feature.

Missing Supportdata

The data in this article is incomplete due to missing Supportdata-Probes for the models listed below.
If you own any of these models and would like to help then please get in touch.

SMW-Browser

Information is currently being retrieved from the backend.