Questions tagged [ubifs]

Concerning the Linux UBI and UbiFs layer for NAND and NOR flash chips.

Ubifs is a flash file system which support raw flash devices like NOR and SLC/MLC NAND flash. It does not support flash cards, like compact flash, MMC, SD, etc. which typically have built-in controllers. Ubifs was introduce to Linux in version 2.6.27 circa 2008.

UbiFs is layer upon UBI or the Unsorted block image layer. In turn UBI is on top of an MTD (media technology driver) which is basically a Linux flash driver.

  • The MTD is a combination of the flash chip and a CPU interface to that chip; the flash controller.
  • UBI provides wear leveling and volume management.
  • UbiFs implements the actual filesystem and is simplified, compared to JFFS2, as it doesn't have to deal with wear leveling*. UbiFs uses many data structures, such as wandering trees, a tree node cache, B-trees, Journals, etc.

UbiFs was originally named JFFS3. However, as the design and compatibilty completely diverged in it's development, the name was changed to UbiFs.

References,

43 questions
29
votes
3 answers

How does Linux determine the order of module init calls?

I have a device with SPI flash storage I'd like to use an UBIFS filesystem on that flash device as my rootfs. The problem I'm facing is that the UBI module initializes before the SPI module initializes. Because of this, when UBI loads, it cannot…
Shawn J. Goff
  • 4,265
  • 8
  • 31
  • 38
7
votes
1 answer

ubifs volumes vs. mtd partitions

I'm migrating a product from jffs2 file system to ubifs. Previous jffs2 design contains 3 mtd partitions ( 2 ro and 1 rw ) . moving to ubifs - should I create : One mtd partition and 3 volumes 3 mtd partitions, 1 volume each Basically I'm asking…
user3087632
  • 143
  • 2
  • 9
5
votes
2 answers

unable to attach ubi to mtd partition

We are using MT29F8G08ABABA in our DM365 based custom board. We are using NAND boot. RootFS is in UBIFS format, Below is basic achitecture of the NAND. I am using following commands to create ubifs, $(UBIFS_PATH)/mkfs.ubifs -r $(TARGET_FS) -m 4096…
ART
  • 1,271
  • 2
  • 23
  • 45
4
votes
2 answers

How to check a ubifs filesystem?

ubifs has no fsck program, so how do you check the filesystem integrity when using ubifs? My target system is ARM, Linux 3.2.58.
SeanLabs
  • 1,469
  • 3
  • 16
  • 19
4
votes
1 answer

How to figure out what mtd device is attached to which ubi volume(s)

I cannot find a way to figure out which ubi device is attached to which mtd device. For instance, ubi0 can be attached to mtd1 and ubi1 to mtd0. Does anyone know a way to figure out which is connected to which?
sanne
  • 91
  • 8
3
votes
2 answers

How long does an UBIFS take to sync a file to flash

Does anyone know how long a UBIFS takes to flush/sync a file to flash? The write happens through a normal fwrite operation and I would like to know how long before that write is committed to flash when no other writes to file occur. If not, any way…
user626201
  • 1,264
  • 2
  • 14
  • 33
3
votes
1 answer

Corruption of UBI in UBIFS

We are using Linux-2.6.28 and 2 Gb NAND Flash in our system ; After some amount of power cycle tests we are observing the following errors : Volume operational found at volume id 3 read 21966848 bytes from volume 3 to 80400000(buf address) UBI…
lxusr
  • 887
  • 1
  • 15
  • 27
2
votes
1 answer

UBI failed to attach mtd3

I'm trying to create an operating system that works with UBIFS on SPI Nor flash. I used buildroot. Buildroot created rootfs.ubi and rootfs.ubifs therefore I didn't create any ubifs.img(I thought don't need it). I didn't take any error when compile…
Faruk
  • 314
  • 2
  • 11
2
votes
0 answers

How to enabled extended attributes in UBIFS for SELinux?

I am trying to run SELinux chcon command on a UBIFS root filesystem and I get chcon: failed to change context of '/' to 'system_u:object_r:root_t': Operation not supported. I understand SELinux needs filesystem support for extended attributes. For…
uuwen
  • 23
  • 3
2
votes
1 answer

how to make a .ubi file from .tar.gz

How can i make a .ubi file from a .tar.gz or folder if this is possible at all? I looked at this (did not help me): Creating UBI Image To create the image from a rootfs you've built first you need to create the ubi.ini file, that describes your ubi…
kevin ver
  • 763
  • 4
  • 13
  • 35
2
votes
2 answers

Reason for ubi filesystem corruption

I have used ubi filesystem and mtd subsystem to work on the top of NAND flash. It was working fine. But now I'm finding the following errors: UBI error: ubi_io_read: error -74 while reading 516096 bytes from PEB 2701:8192, read 516096…
Sujatha
  • 133
  • 1
  • 3
  • 11
1
vote
1 answer

UBIFS boot error

I have a SAM9 based board running embedded linux. I had a JFFS2 file system and now thinking of moving to UBIFS. I enabled UBIFS as target file system in make menuconfig of buildroot package which I'm using for my board. I generated the…
androidFan
  • 571
  • 1
  • 16
  • 31
1
vote
0 answers

Question about differences using fscrypt on ubifs compared with ext4

I am working on an embedded Linux project that can run on multiple platforms. One uses e.MMC for storage and another NAND flash. I want to encrypt all the filesystems (mainly to protect against someone unsoldering the flash chips and putting them in…
Ivan Barr
  • 11
  • 2
1
vote
0 answers

How to retrieve corrupted block from NAND dump?

I have a corrupted ubifs partition: [ 16.594177] UBIFS: recovery needed [ 16.708496] UBIFS error (pid 845): ubifs_check_node: bad CRC: calculated 0x60deed4b, read 0x8709e701 [ 16.718170] UBIFS error (pid 845): ubifs_check_node: bad node at LEB…
kuzz
  • 11
  • 3
1
vote
1 answer

bootlin kernel doesn't boot from UBIFS

Following bootlin embedded linux course and faced an issue (similar to UBI layout volume not found but my problem is further than original one) I am creating rootfs and data volume images: mkfs.ubifs -d ./www/upload -o ../data.ubifs -e 124KiB -m…
goodcoffee
  • 11
  • 3
1
2 3