Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-24-2005, 06:07 PM   #1
Registered: Oct 2003
Location: Vancouver
Distribution: RH Enterprise AS 3
Posts: 47

Rep: Reputation: 15
Running fsck

Hi everyone,

I've seen similar posts to my questions, but I think mine are sufficiently different to warrant this post. So I'll get on with it:

I would like to run fsck on my server, but am unsure how to do it.

I managed to unmount everything but /usr and /var (and maybe /boot). I'm not sure what was using these FS'. How can I track down what is using them and stop them?

I told fsck not to check those FS', and the last thing it says before (apparently) doing nothing (no prompt) is "check aborted." What's happening?

I stopped all the services that I explicitly started/control (eg. httpd, ypbind) but there are things like mpmd that I am unfamiliar with and don't want to touch.

Is there some sort of command to stop all services except those needed to just run the system?

I've also read in numerous places that 'shutdown -rF' will cause an fsck to run. What about the various options that can be supplied? My concern here is that the fsck on boot is just a cursory look at the filesystems rather than a detailed look.

I've also read about booting off a CD to do the check. That still involves a reboot which I would like to avoid. But, can I fsck /root, etc. without using the CD?

Lastly, can fsck auto-fix errors? Will it log its results anywhere? I have some large drives that I would like to check overnight.

Sorry if these questions are dumb, or have been covered, but I want to make sure I can am adequately prepared to do this before I try it again.

Thanks a lot.
Old 01-24-2005, 06:29 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,896

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
I beleive I can competently address some of your post. Skip down to the part about 'shutdown -rF'.
If you check the man or info pages for shutdown, you will see that it will indeed force fsck before the partitions are mounted. You are not offered much more in the way of options.
On the other hand, booting from cd would be the way to go because you boot the kernel image from the cd, not the installed kernel. Once booted, if you take a look at /etc/fstab, you won't find any of your partitions! You are running from the cd, not the installed os.
Therefore, print a copy of your /etc/fstab. Then reboot from cd. Then edit the running copy of fstab (from cd) to add the partitions you want to run fsck on. They are now identified to the system running from cd, but not mounted. You can safely run fsck on the unmounted partitions (all of them).
Fsck -a will automatically repair a file system, without questions.
Fsck -r will repair interactively; the larger the system, the longer it will take to answer questions.
Fsck doesn't offer the option to log it's activities. However, you may be able to pipe the activity through tee to a named file:
fsck -a | tee fsck.txt
I've never tried it, so I don't know that it will work. But the tee utility is useful to send terminal output to a file for later inspection.
Finally. Your questions are not dumb. The way to learn is to ask questions. Not asking is dumb.
Old 01-25-2005, 08:12 PM   #3
Registered: Oct 2003
Location: Vancouver
Distribution: RH Enterprise AS 3
Posts: 47

Original Poster
Rep: Reputation: 15
Thanks for the informative response, bigrigdriver.

Now all I have to do is check the other posts for making a boot disk

Thanks again!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to fsck / while system running LinuxGeek Linux - Software 2 07-19-2005 11:43 AM
mount -r while fsck is running? aaccomazzi Linux - Hardware 1 10-20-2004 05:00 PM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 08:51 AM
Is there any point in running fsck.ext3? Rundi Linux - General 11 03-12-2004 10:28 AM
running fsck rbrooks Linux - Newbie 1 05-16-2002 05:30 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:23 PM.

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