Thursday, March 12, 2009

Change frequency of filesystem check at boot

Sometimes, even though Ubuntu has the option to press cancel, you think that boot fsck happens way too often. I think that every 50 boots it would be great rather than every 20... So I ran df, just to remember the names of the partitions and
sudo tune2fs -c 50 /dev/sdb1

(where sdb1 was my primary partition). In case you want to check every x days,months or weeks there is this neefty parameter
-i interval-between-checks[d|m|w]

. So the command would be something like this(if you want boh the 50 times interval and 1 month),
sudo tune2fs -c 50 -i 1m /dev/sdb1

With this you can see how much time you've got left
sudo dumpe2fs -h /dev/sdb1 | grep -i 'mount count'

and by editing the sixth(last) column in ftsab
sudo gedit /etc/fstab

The 6th column (in bold) is a fsck options.

  • 0 = Do not check.

  • 1 = First file system (partition) to check;  // (root partition) should be set to 1.

  • 2 = ALL OTHER file systems to be checked.

No comments:

Post a Comment