Kernel panic on VF50 after power failing

My Colibri VF50 module cannot boot properly after power failing. It stops booting with such information:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I’ve already got this error two times after power failing.
Is this true that fs crashing after loosening power? How can I prevent fs crashing in such cases (ups is not possible to use)?

Can you please provide complete boot logs if possible ?

Which image are you using? Is this the Console only image? Could it be that the file system was full (or almost full) at that point?

I’ll try to repeat this error (I’ve already reinstalled Linux on module) and show that logs.

I use Colibri_VF_LinuxImageV2.6.1Beta1_20161001 which is not Console only image.
It takes near 100 Mb from 128 Mb

I’ve just got this error again. See logs in attachment: Boot logs

Thanks for the log.

We had seen issues before in the lower layered UBI and it also involved U-Boot and/or Fastmap, but this seems unlikely to be the issue here.

The message mentions an UBIFS error, it seems that a node got corrupted. UBIFS should be safe against power failures so this should really not happen.

It could be related to a file system full/almost full corner case issue. It is really hard for a file system to operate when it is about to be full, especially if it is a compressing file system like UBIFS. I recommend to strip down the image a bit, and/or disable logging so that there is always some space left.

I see that you are using a custom kernel, what changes, if any, do you made to the kernel?

Note that you don’t have 128MB NAND available for the root file system: There is overhead for the bad block management (~2MB), the Boot Loader, Kernel and Device Tree (~10MB) plus UBI wear leveling/volume managment and UBIFS file system overhead. With the LXDE image the NAND is pretty much full…

Did you flash the latest image from scratch ? If it is not flashed from scratch ateast make sure to erase the nand chip before flashing the latest image as mentioned in the article here. We are doing a powercut stress test on Colibri VF50 with our prebuild Linux Image, the test is running since 10-15-2016, so far no issues observed.