LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-05-2010, 10:23 AM   #1
lrt
Member
 
Registered: Sep 2007
Location: Chattanooga, TN
Distribution: Ubuntu
Posts: 84

Rep: Reputation: 15
Filesystem check


you can refer to this ubuntu thread for context, but i'll sum up what i'm trying to do here to spare the reading. basically i want to be able to schedule a filesystem check with automatic repairs at the next boot time. i know i can run:

Code:
>/forcefsck
reboot
but i'm not sure if this will try to automatically fix errors which is what i want to do. the reason i want to do this is because i experienced a power outage (the machine was not plugged into an UPS) and i want to make sure everything is ok.

what should i do?
 
Old 02-05-2010, 11:23 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
but i'm not sure if this will try to automatically fix errors
It will do, if this is possible.

In the above post, your syntax is wrong. It should be (as root)
Code:
touch /forcefsck
reboot
shutdown -rF now used to be the command to Force a fsck at the next boot, but for some reason the -F flag has been removed from shutdown's options.

Last edited by tredegar; 02-05-2010 at 11:24 AM.
 
Old 02-05-2010, 12:09 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You could change the value for the number of times between checks with tune2fs's -c <count> option, or use the -t option for a time based value. You could use -d1 for daily checks. I'm not certain whether -c1 will run fsck every time or every other time.

The manpages suggests staggering the mount counts to avoid each filesystem being mounted at once which presumes a larger -c<count> value.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
force filesystem check true_atlantis Fedora 2 06-10-2006 04:06 PM
Filesystem Check Every Boot springshades Linux - Software 4 08-16-2005 12:25 PM
Filesystem check at bootime firestomper41 Mandriva 5 03-20-2004 11:07 AM
Failed to check Filesystem... keyz_182 Linux - General 8 11-22-2003 09:20 PM
Check filesystem twantrd Linux - Newbie 4 03-26-2003 12:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration