Forcing fsck on boot
jludwig
wralphie at comcast.net
Sat Dec 17 00:33:01 UTC 2005
On Friday 16 December 2005 4:57 pm, akonstam at trinity.edu wrote:
> On Fri, Dec 16, 2005 at 01:36:07PM -0800, Brian D. McGrew wrote:
> > Is there a kernel option or boot option I can give to force fsck?
> >
> > -brian
> >
> > Brian D. McGrew { brian at visionpro.com || brian at doubledimension.com }
> > --
>
> It seems to me you could do that by altering some of the lines in
> /etc/rc.d/rc.sysinit
>
> That is the good news. The bad news is I am having an allergy attack
> and I don't have the psychic energy to plow through the file and find
> the exact lines to change.
> --
>
> =======================================================================
> Oppernockity tunes but once.
> -------------------------------------------
> Aaron Konstam
> Computer Science
> Trinity University
> telephone: (210)-999-7484
If you want to force the check every time then something like this.
This may not be correct !!!!!!!!!
#if [ -f /forcefsck ] || strstr "$cmdline" forcefsck ; then
# fsckoptions="-f $fsckoptions"
#elif [ -f /.autofsck ]; then
if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --ping ; then
chvt 1
fi
# echo $"Your system appears to have shut down uncleanly"
AUTOFSCK_TIMEOUT=5
[ -f /etc/sysconfig/autofsck ] && . /etc/sysconfig/autofsck
if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then
AUTOFSCK_OPT=-f
fi
if [ "$PROMPT" != "no" ]; then
if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then
if /sbin/getkey -c $AUTOFSCK_TIMEOUT -m $"Press N within %d seconds to not
force file system integrity check..." n ; then
AUTOFSCK_OPT=
fi
else
if /sbin/getkey -c $AUTOFSCK_TIMEOUT -m $"Press Y within %d seconds to
force file system integrity check..." y ; then
AUTOFSCK_OPT=-f
fi
fi
echo
--
Some people have convictions.
Some people have opinions
I think I'll have a cheeseburger!
More information about the users
mailing list