Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email 



AUTO FSCK


You probably know already that every 20 to 30 times you reboot your system, or after each un-clean shutdown, you will get a check of the integrity of your file system.

NOTE: this text is only relevant for Ext2 filesystems . . . for Ext3 see "IMPORTANT" at the bottom of this tip.

Also you might have seen on the screen as the system files are checked that you have to hit the Y button within 5 seconds . . . . now, 5 seconds is very short and the chances are you will be just too late . . . the system will continue booting, but if there are problems with the integrity . . . you have a problem . . so most of the time at a file check I had my finger close to the Y button . . not anymore !

I did a few little tweaks:

Open the file ¨/etc/sysconfig/autofsck¨ in vi:

CODE
$ su
< password >
# vi /etc/sysconfig/autofsck


"i" ( to put vi in insert mode )

And you will see two lines:

QUOTE (Text @ Screen )
AUTOFSCK_TIMEOUT=5

( just change the number of seconds here )

and

QUOTE (Text @ Screen )
AUTOFSCK_DEF_CHECK=no

( change the value to yes and it will hit the Y for you )

Save the file

Esc ( put vi in command mode )
ZZ

If there is no such file as ¨/etc/sysconfig/autofsck¨, just make it ( They are the same commands to make or open a file in vi )
Mine looks like this:
 
QUOTE (File @ Mandrake)

# -*- Mode: sh -*-
# $Id:$

# Specify here how many seconds we wait for timeout
AUTOFSCK_TIMEOUT=3

# Specify if we do automatic fsck.
AUTOFSCK_DEF_CHECK=yes

# Specify how many seconds we wait for mounting crypto.
AUTOFSCK_CRYPTO_TIMEOUT=25


The last line is only for if you have a crypto file system installed ( search google/linux if you want to know more about crypto file systems )

IMPORTANT:
The text above is only relevant if you use Ext2 filesystem !

QUOTE (cooker @ Oct 31 2003)

In case of a hard-reset, init messages indicate the computer was not shut down cleanly, and a message appear :"Press Y within 5 seconds to force the file system check "Actually this is very misleading : if you do it with ext3, it does NOT use the journal and then you will experience system losses. Lots of newbies have reported that problem. Now that would be nice to change this message so that people leave the journalisation do the good work. --Eric




Bruno


-- Aug 5 2003 ( Revised Dec 12 2005 ) --


Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email