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,

50 questions
1
vote
2 answers

Unpacking a ubi image with an ubifs image inside

I ran into a problem during my research. I have a firmware file that is downloaded of the internet and im trying to unpack it to emulate the firmware. Good news is that i did it successfully once but i reverted my machine and i cant recreate the…
Nino Osewoudt
  • 33
  • 1
  • 5
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

Problems mounting a ubi image using QEMU

I'm trying to emulate a nand flash with qemu and use that to mount an existent ubifs image on the virtual machine. I added a nand device and a drive of the type mtd, resulting on the following command: $ qemu-system-arm -nographic -M virt -m 64…
PRVS
  • 1,612
  • 4
  • 38
  • 75
1
vote
0 answers

How to retrieve correct filesystem metrics in C for UBIFS filesystem with on-the-fly data compression enabled?

Context I am using UBIFS filesystem with on-the-fly data compression enabled. I need to get correct filesystem metrics (total, used, free space) in a C code. What was tried I used statvfs call to retrieve the metrics successfully but noticed that…
1
vote
1 answer

Do we need to fsync the parent directory in UBIFS for atomic *and* durable file updates

Here's the typical and well-known approach for atomic file updates: fd = open(“foo.new”, O_WRONLY); write(fd, buf, bufsize); fsync(fd); close(fd); rename(“foo.new”, “foo”); In general, if we also want durability (i.e. a guarantee that the new…
Grodriguez
  • 21,501
  • 10
  • 63
  • 107
1
vote
1 answer

UBI error: ubi_compare_lebs: unsupported on-flash UBI format

I need to make a ubi based partition, while executing ubiattach below error is coming for (29MiB partition) I could able to fomrat attach and mount a partition with 2MiB.. issue is happening with 29 MiB partition. Could someone help on this Kernel…
shafi
  • 145
  • 6
1
vote
0 answers

Read errors after an UBIFS update

I am encountering the messages below after creating an UBIFS filesystem in a new UBI volume on an existing UBI partition. This happens while reading all the files on the UBI fs via tar -cf /dev/null *: UBIFS error (pid 1810): ubifs_read_node: bad…
patraulea
  • 652
  • 2
  • 5
  • 26
1
vote
2 answers

Detect if MTD partition is UBI formatted

Is there a reliable way to know if an MTD partition (e.g. /dev/mtd0) has already been UBI formatted? I intend to have such a test in a startup script (bash) which calls ubiattach only on MTD partitions which are UBI formatted. For me "blkid" does…
Rogue
  • 73
  • 1
  • 7
1
vote
1 answer

UBI error: ubi_io_read: error -74 (ECC error)

I'm struggling with writing the Linux root file system to a NAND device (MT29F2G08ABAEAH4-IT:E). I have a UBI image created by Yocto as follows: mkfs.ubifs -r /path/to/rootfs -o /path/to/output/rootfs.ubifs -m 2048 -e 129024 -c 1600 -F ubinize -o…
yman
  • 349
  • 4
  • 18
1
vote
1 answer

Is there a way to create virtual Linux MTD device, sort of simulate one for experiments

Want to know if we can create a virtual MTD device or sort of simulate a MTD device on Linux to play with UBIFS. I don't have one and I am exploring options to play with UBIFS.
jarvis1729
  • 147
  • 2
  • 8
1
vote
2 answers

How can I set a ubifs generated by yocto as rootfs?

I try to set UBIFS as the rootfs on a board. These are my mtd devices when I use a bootable filesystem: cat /proc/mtd mtd0: 08000000 00020000 "fe8000000.flash" mtd1: 00100000 00010000 "u-boot" mtd2: 00500000 00010000 "kernel" mtd3: 00100000 00010000…
h0ch5tr4355
  • 2,092
  • 4
  • 28
  • 51
1
vote
1 answer

Copy UBIFS partition to NAND device

I have a working system with u-boot and a UBIFS partition on SLC NAND. I've copied the UBIFS partition into a binary image file by reading the whole range of blocks it occupies, including spare area. I can successfully program this image to another…
Adashi
  • 461
  • 1
  • 4
  • 8
1
vote
1 answer

UBIFS mount in busybox via fstab does not recognize relatime option

I am getting this error when I try to mount my UBIFS filesytem: mount -o remount,rw /config UBIFS error (pid 1265): ubifs_parse_options: unrecognized mount option "relatime" or missing value The content of my fstab is : root@drgos:~# cat…
pedr0
  • 2,941
  • 6
  • 32
  • 46
1
vote
1 answer

Detect File System Working in Android

I need your help. I need to know the File System used by one Android Device, How detect if is YAFFS or UBIFS. Thank you. Best Regards, Bernal
bernal
  • 21
  • 1
  • 4
0
votes
0 answers

Can dm-verity will support authentication of Ubifs root file system in Linux

I want to authenticate my root file system which is in Ubifs file type mounted on NAND flash device. Will dm-verity will support ubifs file system ? In dm-verity-img.bb class file i have seen only below file systems mentioned. DM_VERITY_IMAGE =…
cherry411
  • 13
  • 7