I'm using a RPi3 with Raspbian Stretch and I have problems with corrupt file system. I use the Raspberry in a system where a "clean shutdown" is not possible. So I want to run fsck on boot. I have added the following in the /boot/cmdline.txt
(I'm surprised that the file is empty after new Raspbian installation, so only the following parameters are added)
fsck.mode=force fsck.repair=yes
But when I restart the following error appears:
kernel panic-not syncing: VFS: unable to mount root fs on unknown block(0,0)
How can I solve this problem? Or is there another way to automatically repair the file system when booting?
I used the Raspberry Pi 2 for a long time. Here I never had a problem with a corrupt file system. Is that a specialty of the Raspberry Pi 3?
fsck.repair=yes
and implicitfsck.mode=auto
would do what you want; seeman systemd-fsck
; when "the filesystem checker deems necessary" includes when it has not been cleanly unmounted. WRT problems with a corrupt filesystem, they don't necessarily happen, but they may happen anytime you don't shutdown cleanly.