I am running my application on colibri-vf50 toradex(running over angstrom distribution) board having sqlite database resides on sd-card. My sd-card becomes read-only whenever I remove power-supply just after board boot up(same time my app start making connection with db). Due to this I getting error in dmesg like "FAT-fs (mmcblk0p1): error, clusters badly computed".
After this sqlite can not write in db. I also tried to repair using fsck using below command but found no success.
$ fsck.msdos -r -v /dev/mmcblk
Currently, only 1 or 2 FATs are supported, not 251.
I also tried with various journel_mode of sqlite but could not prevent. So How I can prevent my sd-card to become read-only and also how to repair on board?
Thanks in advance