I have an ubuntu server (11.10) on a single-board computer that occasionally is subject to being powered down unexpectedly. When it is booted afterward, fsck prompts the user to hit ‘f’ to check the drive. Because this server does not normally have a monitor and keyboard connected, and the only way to normally access it is through SSH, this is very inconvenient.
Is there a way of guaranteeing that on boot any required fsck check can be done without user input? Basically, I want it to always run ‘fsck -y’ on boot (when problems are detected), rather than prompting the user for input.
Thanks!
So I found two related solutions to my problem:
I’m not sure these are valid everywhere, but they work on ubuntu server 11.10.
/etc/default/rcS looks like this:
Make sure that that final line instead reads
Another barrier I had to the system just booting always without requiring user intervention was the grub bootloader screen waiting for user input after a failed / interrupted boot.
This requires editing the grub setup file in
/etc/grub.d/00_header
simply change line 236 to
and line 238 to
This causes the system to never pause while booting. After editing the file, run
sudo update-grubto get the changes implemented in the /boot/grub/grub.cfg file.