Unsorted Block Images (UBI)
UBI is the Linux raw-flash volume layer that maps logical eraseblocks to physical eraseblocks and manages wear and bad blocks above MTD.
UBI sits between Memory Technology Devices (MTD), which exposes raw flash, and consumers such as UBIFS. Its logical eraseblocks (LEBs) can be mapped to different physical eraseblocks (PEBs); a logical location is therefore not a fixed chip address. [1]
UBI supplies volumes, not files and directories. UBIFS supplies the filesystem above them. UBI's eraseblock interface is not the ordinary sector interface of an SSD; Linux v6.16 offers a separate, optional read-only ubiblock interface for block-oriented consumers. [2]
Bad-block handling has finite replacement capacity. In Linux v6.16, the erase-worker path can use available unallocated eraseblocks after its dedicated bad-block reserve is empty; when neither is available it switches to read-only mode. This protects the write path, not the readability of every stored byte. [3]
Whole-volume updates use a persistent marker. Interruption can leave the volume unavailable for normal I/O until another update; single-LEB atomic change is a separate operation. Do not infer image rollback from the existence of the latter API. [4]
Relations
- related
- UBI File System (UBIFS), NAND flash, NAND erase block, Bad block management, Wear leveling, Atomic LEB change (UBI)
Citations
- Linux kernel, UBIFS Authentication Support: MTD, UBI and UBIFS
- Linux v6.16, UBI configuration: volume management and read-only block interface
- Linux v6.16, UBI wear leveling: erase-worker replacement-pool handling
- Linux v6.16, UBI volume-update marker and start/update paths
Sources & caveats
- Source review of Linux raw-flash layers; this is not an SSD firmware specification or a device-failure experiment.