I am working with embedded Linux build with Yocto. My goal is to enforce file checking during each system booting. So far I did the following steps:
- I've modified the
/etc/default/rcSfile and I've setENABLE_ROOTFS_FSCK=yesandFSCKFIX=yes. - I've used this command
tune2fs -c 1 <my_fs>to check my fs during each booting.
I see the following log
`EXT4-fs (mmcblk0p2): warning: maximal mount count reached, running e2fsck is recommended`
before mounting the root partition, but fsck is trying to check the partition just after it was mounted. So the process is aborted. The log:
mount: / is busy
*** ERROR! Cannot fsck root fs because it is not mounted read-only!
How can I enforce fsck to check the file system before mounting the partition? Thank you in advanced for any help.