Set up mount count after system will be checked by e2fsck

I think everybody faced automatic filesystem checking invoked after it was mounted some certain number of times. It happens for me after 20 mounts of root filesystem with my Ubuntu Feisty (as well as any other distros that were installed), next time I boot up my laptop e2fsck starts.

It’s not a problem but very important feature and is highly recommended to be enabled in order to keep integrity of your data. But it’s possible to change number of mount times before checking is invoked by tune2fs Unix/Linux utility.

In order to get current state of maximum mount count after filesystem will be checked just execute:

sudo tune2fs -l /dev/sda2

where /dev/sda2 is Linux partition device name root filesystem is mounted at. The output of this command will show a lot of other filesystem information, but we need only line “Maximum mount count” (in my case it’s “Maximum mount count: 20“). To get total number of times filesystem was mounted execute: sudo tune2fs -l /dev/sda2 | grep “Mount count”.

To change maximum mount count to 25 please do: sudo tune2fs -c 25 /dev/sda2

 
 
» You might also be interested in the following articles:
16 GB encrypted candy file
Install Windows after Ubuntu Lucid Lynx
October Survey: People try many Linux distros
FAQ: How to install manual pages in Solaris?
One more way to count CPUs in Linux



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!

0 Responses to “Set up mount count after system will be checked by e2fsck”


  1. No Comments

Leave a Reply




Friendly Sites:Who is behind Linux Screw?
GeekyBits³ | Bash Cures Cancer | OMG! Ubuntu!
My SysAd Blog | Web Upd8
ZEPY | Linux config Wiki | Planet Sysadmin
a non-geek's linux notes | Linux Today
TuxArena: The arena of Tux | LinuxAlt.Com
My name is Artem N. (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››