I had some friends over last week and I just couldn’t resist the temptation to show off my attractive GNOME desktop. So I fired up the box, everything was going nicely with me giving a running commentary on the boot process when suddenly I got the “/dev/sda1 has been mounted 30 times without being checked… check forced” message… oh oh. Pressing Ctrl + C had no effect plus the nice usplash screen had given way to an ugly black-and-white screen. So there I was in a very difficult position because I’d bragged about linux extensively to these guys and now what… “this is linux, you have to wait 10 minutes for it to load?” Imagine going in to make a presentation and this happens to you… you’d be very annoyed at the paranoid developers who put this ridiculous disk check system in place.
Before anybody jumps down my throat, I am not saying forcing a disk check is a bad idea. It is a clever way of nipping file system corruption (as a result of stuff like hardware failures, kernel bugs, flaky memory chips, et cetera) in the bud BUT that should not translate into inconvenience to the user. I’m thinking that perhaps giving the user the choice to skip the disk check and repeating the message on subsequent boots until he accepts is a better way of doing things. This way, I can get my real stuff done in a hurry and when I’m done, I just reboot and let the disk check take place.
Another thing that irritates me is how the nice usplash is rudely replaced by an ugly black-and-white screen whenever stuff like disk checks and other errors occur during the boot process. I want my splash image at ALL TIMES. Anyways, to disable the disk check completely, all you have to do is run the tune2fs command. Here’s an example, my root partition is /dev/sda1 so I had to do:
sudo tune2fs -c 0 -i 0 /dev/sda1
Be careful with this however as the danger of file system corruption if you forget to manually check the disk for errors is REAL. If you’re not looking to disable the disk check completely but want it forced after a larger number of mounts (or reboots) then you should modify the -c parameter accordingly. For instance, to increase the maximum disk mount count from the default of 30 to 50, do:
sudo tune2fs -c 50 -i 0 /dev/sda1
Now, the disk check will be forced after 50 mounts instead of 30.
PS: Remember to run manual disk checks regularly if you disable forced disk checking! Don’t say I did not warn you. 🙂