It's built on Ubuntu right? You should be able to edit /etc/defaults/rcS
And edit/add the line: FSCKFIX=yes
From the man page -- man5/rcS.5.html
FSCKFIX
When the root and all other file systems are checked, fsck is invoked with the -a
option which means "autorepair". If there are major inconsistencies then the fsck
process will bail out. The system will print a message asking the administrator to
repair the file system manually and will present a root shell prompt (actually a
sulogin prompt) on the console. Setting this option to yes causes the fsck
commands to be run with the -y option instead of the -a option. This will tell
fsck always to repair the file systems without asking for permission.
Edit - duplicate (didn't realize posts were moderated).
BTW, there is some risk in this, it's possible for the fs to be really messed up and require manual fixing but I only know of a couple 'nix SysAdmins even capable of it (I am not one of them).
Backups are your friend! After I get an RPi sd card how I want it, I'll use one of the image reader/writer programs to make an ISO/IMG file of it. I usually use Win32 Disk Imager.
Last edit: 5 years 3 weeks ago by Robert Porter. Reason: Duplicate