I'm just curious - why do all linux distros (all I've seen) run their periodic disk checks during boot? I mean, I understand that a disk should be checked now and then, but why does the system do it during boot, when I'm waiting for it to load, instead of checking them during shutdown, when (most probably) user doesn't need the computer anymore.

Am I missing something?

closed as not constructive by BinaryMisfit Dec 3 '10 at 15:21

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Running disk check on system shutdown is a bad idea because the filesystem or the system itself might be in a corrupt state. During boot everything is "reset" and in a well defined state so it is less likely that you encounter problems caused by programming errors that might compromise your filessystem(s). – Waxhead Dec 11 '11 at 23:00

I agree with your opinion. This is a dubious design and even worse, by murphy law, the fsck will usually happen the day when you are most in a hurry. However, nothing prevents you to add a rc task that will check your file systems at shutdown time if their counters is close to the limit. An even better solution would be to use a file system (possibly on another OS) that doesn't need fsck at all, like ZFS.

  • "fsck will usually happen the day when you are most in a hurry" .. yes, when you want to go home and have to catch the train :) – akira Dec 3 '10 at 13:47
  • In such case, I have no problem letting my machine shutting down unattended. – jlliagre Dec 3 '10 at 14:32
  • 1
    @jiliagre: especially with such questions such as "shall i fix these corrupt inodes?" :) – akira Dec 3 '10 at 15:23
  • No questions asked. I always run "fsck -y". what's the point of running fsck if not for fixing broken stuff anyway ... – jlliagre Dec 3 '10 at 16:59
  • 2
    By the way, there is a script and a petition here to avoid that nuisance: wiki.ubuntu.com/AutoFsck – jlliagre Dec 15 '10 at 7:01

so, you would rather work on a faulty system and possibly lose the work of a day than getting informed BEFORE you start to work?

for most users it is better to get informed about potentiall problems BEFORE they write stuff to their disk and thus this is the default behavior. nevertheless, you can run the filesystem checks on your system whenever you want.

  • 1
    As the disk is extremely unlikely to have its content modified when powered off, I don't think your "BEFORE" point is that much valid. Whether the check is done just before the computer is turned off or just before the file system is mounted at boot time is mostly equivalent. – jlliagre Dec 3 '10 at 11:38
  • @jiliagre: the content is not modified at shutdown because it was modified BEFORE :) and it is not equivalent because you shut down a system, take the disk somewhere, wait a month, put it into another computer. you do not check an airplane when you leave the cockpit but when you enter it and are ready to lift off. – akira Dec 3 '10 at 13:46
  • Before each workphase comes: 1 Shutdown, 1 Off, 1 Boot. We can't check during the Off-phase, but we can check during either Shutdown or Boot, and I agree that unless the PC got moved much it should make no difference which you choose but Shutdown is more comfortable for the user. In an ideal world it would check again on boot if the an always-on movement sensor recorded cases of drastic movement and/or the PC was off for a long time. – Carighan Maconar Dec 3 '10 at 14:30
  • Dust and other contamination can cause havoc to a harddrive after having it stored. For instance if you forget to close a window and leave your house for a week or simply turn off the heat condensation and/or other contamination might cause your disk not be in the same state as it was when turned off. There are probably a gazillion other things as well that might happen to your harddrive when turned of for a longer period like oil from the bearings leaking out on the platter, dust particles etc etc... – Waxhead Dec 11 '11 at 23:06

Yes, but only every so often. It is configurable how many boots (or time) have to elapse until the next check.

I guess you would have to wait also at shutdown, and may be you would be eager to go home far more than you are eager to start working at boot time -:)


If I were a programmer I'd submit a patch for shutdown that displays a dialog: "The filesystem on /dev/sdd4 will need to be checked after 2 more reboots. Would you like to check it now, or wait until later?" (Same for halt and the other shutdown-like commands.)

Of course, this being Linux I shut down my desktop box only for kernel installs, so it's not a huge issue.


I like your idea.. You should request that as a feature on something like http://brainstorm.ubuntu.com/. Let others vote it up, and see if it can get implemented.. (or if there are technical reasons why not).. I love the 12 second boot on my SSD, I hate it when it becomes a 2 min boot because of fsck.. I like CarlF's idea about a dialog warning you, so you can run it early.

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