0

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

4

2 回答 2

0

我使用kparted,之前卸载设备,然后标记分区,然后在顶部,设备,制作新的FAT。然后做了一个新的分区,一切都恢复了。

于 2018-05-27T03:00:05.973 回答
0

由于 dosfstools 在运行的板上不可用埃。因此无法自行修复板上的 sd 卡。但是可以使用以下命令在笔记本电脑上进行修复: sudo dosfsck -r -a /dev/sdb1

所以为了防止出现问题,我将文件系统从 FAT32 更改为 ext4。其中 fsck 在启动时进行恢复。

于 2017-10-26T05:59:36.637 回答