Alexandru Stoian
I have been working with roms for android before but these are different they use ubifs and I'm having quite some troubles mounting them.
I found a nice overview here
at infradeadPeople are often confused about what UBI is, which was the reason for creating this section. Please, realize that:
UBI is not a Flash Translation Layer (FTL), and it has nothing to do with FTL;
UBI works with bare flashes, and it does not work with consumer flashes like MMC, RS-MMC, eMMC, SD, mini-SD, micro-SD, CompactFlash, MemoryStick, USB flash drive, etc; instead, UBI works with raw flash devices, which are mostly found in embedded devices like mobile phones, etc.
UBIFS is a new flash file system developed by Nokia engineers with help of the University of Szeged. In a way, UBIFS may be considered as the next generation of the JFFS2 file-system.
JFFS2 file system works on top of MTD devices, but UBIFS works on top of UBI volumes and cannot operate on top of MTD devices. In other words, there are 3 subsystems involved:
MTD subsystem, which provides uniform interface to access flash chips. MTD provides an notion of MTD devices (e.g., /dev/mtd0) which basically represents raw flash;
UBI subsystem, which is a wear-leveling and volume management system for flash devices; UBI works on top of MTD devices and provides a notion of UBI volumes; UBI volumes are higher level entities than MTD devices and they are devoid of many unpleasant issues MTD devices have (e.g., wearing and bad blocks); see here for more information;
UBIFS file system, which works on top of UBI volumes.
Check
this slide here as well please
How do I attach an MTD device?Each MTD device has a name and a number, which you may find out by examining the /proc/mtd file. The preferable way to attach MTD devices is to attach them by name, not by number, because MTD device numbers may change if you change the layout of your flash, while the names will supposedly stay the same.
If UBI is compiled as a kernel module, it is enough to specify the MTD device name or number to attach in the module arguments, e.g.
$ modprobe ubi mtd=rootfs
$ modprobe ubi mtd=0
loads the UBI kernel module and attaches MTD device named "rootfs" or with number 3 (mtd3). And
$ modprobe ubi mtd=config mtd=rootfs
$ modprobe ubi mtd=3 mtd=5
command loads UBI kernel module and attaches MTD devices named "config" and "rootfs", or mtd3 and mtd5.
If UBI is compiled into the kernel, the mtd device to attach may be specified in the ubi.mtd=kernel boot parameter, e.g.,
ubi.mtd=rootfs
ubi.mtd=0
command makes UBI attach MTD device named "rootfs" or mtd3 when the kernel is booting. And
ubi.mtd=config ubi.mtd=rootfs
ubi.mtd=3 ubi.mtd=5
command makes UBI attach MTD devices named "config" and "rootfs", or mtd3 and mtd5.
And finally, MTD devices may be attached or detached at any time with the ubiattach and ubidetach utilities; For example,
$ ubiattach /dev/ubi_ctrl -m 3
attaches mtd3. But these utilities will work with kernel versions starting from version 2.6.25. And someone should update them and teach to accept MTD device names, not only MTD device numbers.
— geändert am 24.07.2011, 10:18:21
Empfohlener redaktioneller Inhalt
Mit Deiner Zustimmung wird hier ein externer Inhalt geladen.
Mit Klick auf den oben stehenden Button erklärst Du Dich damit einverstanden, dass Dir externe Inhalte angezeigt werden dürfen. Dabei können personenbezogene Daten an Drittanbieter übermittelt werden. Mehr Infos dazu findest Du in unserer Datenschutzerklärung.