Force fsck on boot

Each time I delete something on my home ext4 partition using accursed Paragon ExtFS for Windows it creates errors on the partition. While I had other linux distribution it automatically cleaned things up on boot. But openSUSE won’t do it automatically, so it interrupts the boot and throws me into an emergency console. I have to manually run fsck on my home partition, press “yes repair this” several times and reboot.
How do I tell kernel to force-run fsck with -y option when there are errors? I found this answer, however I didn’t get how to apply it to openSUSE. I only found /etc/init.d/rcS.d/ directory which is empty.

On the other hand there is ntfs partition, which was added to fstab. It mounts normally while booting, however if Windows wasn’t shut down correctly, the boot interrupts and something like “reboot windows, run chkdsk and then we will see” is shown. How do I tell kernel to run fsck or ntfsfix (by the way, which one would you suggest as a chkdsk replacement?) when there are errors on ntfs partition?

P.S. I just want to be sure that everyone gets me right. I need to run those error-fixes only where there *are *errors, not each boot!

If, for some reason, I power off without a clean shutdown, then I do see “fsck” running on the next boot and cleaning up the file system.

From your description, it seems that there are errors than cannot be automatically fixed by “fsck” and require manual intervention.

IMHO an NTFS file system that is unusable through faulty Windows shutdow, should be repaired through Windows. As the message advises.

And maybe you should not touch your ext4 file system (or any Linux file system) with Windows. The more so because you apparently encountered problems more then once. This means that the Windows software that pretends it can handle ext4 is borked. And that means that it will only be a matter of time before it breakks your ext4 beyond repair.

Remember that fsck is only a last resort that will try to repair when something is utterly wrong. It is not something you should use as “I don’t mind when my ext4 brakes, because I can always fsck”. Every time you use fsck and it succeeds in repairing your file system (and that may be with loss of one or more files), you should be glad you still have something usable. Remove the sweat from your face. Not something to repeat on purpose by letting Windows touching it again!

Oh my. I’m so disappointed to hear that. I hope Paragon $#!tcoders burn in hell >:(
Will avoid further write-access from Windows. However, can you at least tell me how do I tell kernel (using fstab options, or?..) to ignore the corrupted windows partition if it can’t fix it anyway? Just boot like Ubuntu does. Yeah the record from fstab wouldn’t be mounted. However, I find boot speed more important
P.S. No claims or pretensions guys, just askin. Why would nobody on Linux Q&A say the same warnings? Like, do they really avoid being off-topic that much they will harm the guy who put up the question, or?..

In fstab add nofail to the options. this will cause the boot not to fail if the partition fails to mount

Generally you don’t want a full fsck on boot it slows thing considerably. Also fsck may or may not repair a FS. If the FS is bad enough damaged some files or directories may ne lost. parts of them may be found in the lost&found diectory. Use MS utilities to repair MS FS

putting fsck.mode=force may work but you should only use at boot

at boot menu press e find line starting linux or linuxefi go to true end (it wraps) add space and the above. it will work just for the single boot

gogalthorp, thanks, man!
UPD: Generally I don’t want to type root password and do monkey typing at all. Thank you for the kernel option, but I guess I’d better re-configure the GRUB2 to add fsck.mode=force to the other list

splash=silent quiet loglevel=3 showopts

However, can you tell me if that’s similar to -y option of fsck **OR **does it force the fsck each boot, no matter if there are mount errors or not?

It forces no matter what. You can try “fsck.repair=true” which should use “-y” instead of “-a” option, but I’m not sure if Leap already has it.

arvidjaar, thanks man! I don’t want to stress-test (with deleting from windows) immediately, but I’m pretty sure that 4.1.13 supports this option (or should I look on the fsck’s version?)
Added to kernel opts by now, will report any failure