Home > bash > Change disk checking (fsck) frequency at boot

Change disk checking (fsck) frequency at boot


How to change disk checking (fsck) frequency at boot?


Ubuntu checks the root partition at about every 30th boot. If you have a desktop machine/laptop that you switch off every day, this number may be too small. In this case you can safely increase this number to 50 at least.

First, figure out where your root partition is using the df command which produces this result in my case:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda6             30850168   9374588  19908444  33% /
/dev/sda8            129636480  52663092  76973388  41% /media/DATA

So my root partition (‘/‘) is at /dev/sda6.

Then check out your disk checking frequency:

sudo dumpe2fs /dev/sda6 | grep -i "mount count"

Where you need to replace /dev/sda6 with the value that is specific to your root partition. Its output is something like this:

dumpe2fs 1.41.12 (17-May-2010)
Mount count:              12
Maximum mount count:      26

Finally, if I want to increase the frequency to 50:

sudo tune2fs -c 50 /dev/sda6

Where, again, you might need to replace /dev/sda6.

Categories: bash Tags: , , , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: