Check SD Card for errors

Hi,

Every time I encounter an unexpected power outage the SD card is getting some errors (naturally) that need to be fixed.
So far I was using my Windows 10 on my desktop to check and fix these errors, but that means I need to unplug the SD card from the RPi and plug it to my computer.
I was wondering if there’s a way to check and fix those errors from within the RPi itself via the CLI.

10x

If the fs is marked unclean, osmc eill check it itself on startup iirc.

Besides that it automatically will be checked as @mcobit a sudo touch /forcefsck would force a check unless your boot partition is so corrupted that it doesn’t boot anymore.

thanks, i will try using this command the next time i have a power outage and hopefully it will solve the issue.

Does the check place a log somewhere? I forced a check but didn’t wait in front of the screen through the boot process (ain’t nobody got time for that ;-)).

I doubt any logs but I guess it would wait in case of uncorrected errors