Hello,
I am using a custom board based on the BeagleBoneBlack, but using NAND instead of eMMC. Linux kernel is 3.12. I am having some problems using UBIFS. We would like to use a UBIFS partition to store some of our application specific log files.
In Linux, I can create a UBIFS partition fine following http://processors.wiki.ti.com/index.php/UBIFS_Support#Mounting_a_NAND_partition_using_UBIFS as follows:
root@beaglebone:~# ubiformat /dev/mtd10 -s 2048 -O 2048
ubiformat: mtd10 (nand), size 8388608 bytes (8.0 MiB), 64 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 63 -- 100 % complete
ubiformat: 64 eraseblocks have valid erase counter, mean value is 0
ubiformat: formatting eraseblock 63 -- 100 % complete
root@beaglebone:~# ubiattach /dev/ubi_ctrl -m 10 -O 2048
UBI device number 0, total 64 LEBs (8126464 bytes, 7.8 MiB), available 38 LEBs (4825088 bytes, 4.6 MiB), LEB size 126976 bytes (124.0 KiB)
root@beaglebone:~# ubimkvol /dev/ubi0 -N ubifs_volume -m
Set volume size to 4825088
Volume ID 0, size 38 LEBs (4825088 bytes, 4.6 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "ubifs_volume", alignment 1
root@beaglebone:~# mount -t ubifs ubi0:ubifs_volume /mnt/test
root@beaglebone:~# echo hello>/mnt/test/hello.txt
root@beaglebone:~# cat /mnt/test/hello.txt
hello
Now if I reboot the system and reattach the UBIFS, my file is still there, data in tact:
root@beaglebone:~# ubiattach /dev/ubi_ctrl -m 10 -O 2048
UBI device number 0, total 64 LEBs (8126464 bytes, 7.8 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
root@beaglebone:~# mount -t ubifs ubi0:ubifs_volume /mnt/test
root@beaglebone:~# cat /mnt/test/hello.txt
hello
Everything looks great at this point. I would now like to have this partition mounted automatically at system boot, which is where I am having problems. Here is my /etc/fstab, where I have added the last line to automount my UBIFS:
root@beaglebone:~# cat /etc/fstab
rootfs / auto defaults 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
tmpfs /tmp tmpfs defaults 0 0
ubi0:ubifs_volume /mnt/test ubifs defaults,noatime,rw 0 0
Now when I boot my system, it comes up in emergency mode, and the following errors are printed
UBIFS error (pid 92): ubifs_mount: cannot open "ubi0:ubifs_volume", error -19
Anyone have any idea of what I am missing here? Everywhere I have searched for on the way seems to do it this way, seems pretty straightforward but I just cant get it to work. Any ideas will be greatly appreciated, thank you! - Anthony