Get error -74 (ECC error) during ubiattach

Richard Weinberger richard at nod.at
Sat Dec 20 01:27:13 PST 2014


Hi!

Am 20.12.2014 um 04:43 schrieb t kevin:
> So for uncorrectable ECC error ( e.g., bad block) the only way out is
> to do a fresh ubiformat?
> For device like harddisk you get bad blocks all the time, if it is not
> in the critical sector things can be fixed as much as possible by fsck
> so I was looking for something like fsck.ubifs.

An uncorrectable ECC error means that more bits flipped than your ECC
algorithm can fix.

All you can do is trying to erase the block and hoping that it will
work again.

>>> Is it because the background thread "ubi_bgt2d" has not started yet so
>>> no one could do the data scrubbing during ubiattach stage?
>>
>> UBI does scrubbing if it faces bit-flips (correctable ECC errors).
>>
>>> Is it possible to do something like a fsck.ubifs to fix this issue?
>>
>> No. PEB 404 is bad.
>> Is it always the same block?
> 
> Yes, it is always the same block. What got me confused is below
> message telling bad PEBs is still 0.
> UBI: number of good PEBs:        1920
> UBI: number of bad PEBs:         0
> UBI: number of corrupted PEBs:   0

I agree that this is a bit strange.
UBI treats a block as bad if it has a bad block marker or it detects
so while scrubbing.

But it can also happen that you get a block with bad ECC if a powercut happened
while erasing it.
This is why UBI does not automatically mark it as bad while scanning.
Such a block will be erased.

Thanks,
//richard



More information about the linux-mtd mailing list