Recently, I've been compelled to restart my computer a lot. When I boot, Ubuntu now starts scanning my hard drives for errors, but assures me that I can cancel if I want by pressing 'c'.
Why does Ubuntu do this? If it's necessary, why is it something I can cancel? If it's not necessary, why force me to do it? On what basis is the number of restarts decided?
A disc check is forced by the system every 30 restarts. If you skip the disc check it will do it the next time you restart (unless you manually remove
forcecheck
).You can force this yourself by putting a file
forcefsck
in/
by issuing afrom the terminal.
It is not necessary to always do a check when it's prompted but should be done every now and then. You can cancel it if it is not the right moment for you at that time and let it do the file system check when it is more convenient.
You can also use
tune2fs
to alter this behaviour.will set this to 60 restarts. You can also change this to a time period with
-i
:for 30 days or 1m for 1 month or 10w for 10 weeks.
(replace
/dev/sdXY
by the device name for the partition like/dev/sda1
. You can get this name by runningsudo blkid
orls -lA /dev/disk/by-label
if the partition is labelled)will show loads and loads of information. Part of this includes:
These are routine file system checks, initiated every 30 reboots. The option to cancel it is there so that you are not detained from something critically important, however, it's recommended to let it run once in a while. I don't know on what basis the number of reboots was set, presumably, common sense. If it's too annoying, you can increase the number of reboots without checking partitions using the 'tune2fs' command.
It is possible to completely disable the file system check on ext-filesystems using:
This might not be a good idea thou. The tune2fs manpage notes:
While mikewhatever and Rinzwind are right for ext-Filesystems, afaik, it doesn't happen if you choose to use reiserfs. I'm using it for 10 years without problems and can recommend it. No fsck any more.
I don't know for the other filesystems, popular on Linux.