Fsck – How to Stop Filesystem Check on Boot

fsck

Once in a while (every 30-th boot) my linux system decides to check filesystem for errors. I am ok with this – what needs to be done needs to be done.

But sometimes I need my laptop to boot fast. I need some urgent job to do and I do not have time to wait for fsck to complete (it may take about 10 minutes). How can I stop the check in this case?

The only solution (well, workaround) I come up to now is to turn off auto fsck and run it manually occasionally. I do not like this approach, because I have to remember when it was the last time I run it.

What I want is to be able to press Ctrl+C to abort filesystem check. Let filesystem check run during the next boot!

But actually if I press Ctrl+C fsck just restarts.

Best Answer

fsck has an option which makes it delay the automatic check when the laptop is on battery power; that is, if the filesystem is configured to check once every 30 mounts, it will interpret that as once every 60 battery-powered mounts. Most distributions have it enabled these days. However, it only checks for that at startup.

What you could do is, if the automatic check starts, remove the power supply from your laptop and then restart fsck by whatever way (hard reset, ctrl-c, ...)

Related Question