0

I have a small board that I am trying to use as a headless IOT device. The problem is every once in a while during the boot process it shows the following error.

Errors were found while checking the disk drive for /.   
Press F to attempt to fix the errors, I to ignore, S to skip mounting or M for manual recovery...

Because the device is headless I would really like for the board to automatically "press f" so the user does not have to move the device to a monitor and keyboard just to press f. How can I accomplish this?

  • The answer to your question is here (how-can-i-make-fsck-run-non-interactively-at-boot-time)[askubuntu.com/questions/151025/…. File System Check (fsck) isn't run every boot which means your "once in awhile" could mean errors are always there every boot but fsck isn't run that time you think you have no errors. This should be a greater concern. – WinEunuuchs2Unix Aug 30 '16 at 23:46
  • Thank you. I didn't realize it was fsck. Sometimes half the battle is knowing what to search. – nbroeking Sep 1 '16 at 22:00
  • 1
    I'll repost the comment as an answer. If everything works you can mark it as solved. If you have further comments they can be posted under the new answer. Thanks. – WinEunuuchs2Unix Sep 1 '16 at 23:07
2

The answer to your question is here how-can-i-make-fsck-run-non-interactively-at-boot-time

File System Check (fsck) isn't run every boot so your "once in a while" could mean errors are always there but fsck isn't run when no errors are reported.

Finding the source of file system errors is important. I would take a look at the error messages in /var/log/boot.log and post a new question of what errors there you need help with. Fsck error messages can be in other locations depending on whether upstart or systemd is used for init at boot time.

To force ubuntu to fix all disk errors at boot you need to add FSCKFIX=yes to the file /etc/default/rcS. This tells fsck to run with the -y flag. 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.