F2FS is broken and how to fsck before mount on MT7623 platform?

my device is MT7623A, and somtimes it losts power and after rebooting some files becomes all zero, such as '/usr/lib/opkg/status' and 'opkg' would report 'missing new line character at end of file' and so on.

I guess the power down makes the filesystem broken and no fsck at boot stage. The MT7623a uses the 'F2FS' as the overlay filesystem. Is there any way to fsck the partition before mounting?

I have read 'https://openwrt.org/docs/guide-user/storage/fstab', is it working that I put a fstab config file on the device only? I'm afraid not. The f2fs overlay is mounted by '/sbin/mount_root' application, and there is no /etc/init.d/fstab service on the device.

Could some one provide some suggestion, thanks for reading.

Generally speaking, support for MT7623 is a bit neglected and I would not expect things to work well with that at this point.
I've been waiting to receive my BPi-R2 board (also MT7623-based) for a while, already ordered one in March from a apparently fraudulent source on AliExpress which never arrived and now ordered another one directly from @BPI-SINOVOIP, but they had run out and promised to ship the next batch around May 15th, then it'll be another 2-3 weeks until I get it.
May plan is to also clean up support for that like I did for the BPi-R64 and MT7622 target.
Maybe a bit too long to hold your breath until then...

1 Like

Thank you!
Well, is there any possible that find another way to solve the issue.
How can I change from f2fs to ext4? The device is shipped with eMMC flash driver, ext4 can work on it.