Re: Forcing fsck on boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2005-12-16 at 14:05 -0800, Christian Motta wrote:
> shutdown -Fr now
> 
> or create a file in root called forcecfsck
> 
> Q: How to force a check of the file systems?
> 
> A: If the file "/forcefsck" exists a file system consistency check
> (fsck) will be forced at the next boot up.
> 
> The command line commands look like:
> 
> 	touch /forcefsck
> 	reboot
> 

Correct on creating the file and its function, but I would *never* use a
'reboot' command without using 'sync;sync;sync;reboot'.   "reboot" does
not flush buffers, so if you fail to use the sync in that line, data in
the buffers may not be written to disk and filesystem or data corruption
may occur. It _has_ happened.

Using the 'shutdown' command handles all that for you with both the file
creation and the clean reboot.  Thus the suggestions to use "shutdown
-Fr now" as the best way to do a forced fsck on reboot. 

> 
> akonstam@xxxxxxxxxxx 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@xxxxxxxxxxxxx || brian@xxxxxxxxxxxxxxxxxxx }
> > > --
> > >     
> > 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.
> >   
> -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux