Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 09-29-2003, 02:21 PM   #1
LQ Newbie
Registered: Sep 2003
Location: S. Hamilton, MA USA
Distribution: RH 6.2, 8.0
Posts: 29

Rep: Reputation: 15
Disk diagnostic utilities

I'm beginning to think I'm having some disk hardware problems. I was having sporadic problems with the /var directory, (hardware locatlon /dev/hda5). I ran fsck on it, and had a huge number of disconnected inodes. It seemed to have cleaned them up, and put them in /lost+found, but now, when I do an ls on lost+found, sometimes there are files there, and sometimes, there aren't.

Are there any disk utilities that come with RH 8.0 that I can use for running some hardware diagnostics on /dev/hda5?

thanks for any help.

Old 09-29-2003, 03:16 PM   #2
LQ Guru
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
what kind of diognostics?
if you are searching for badblocks you can use badblocks
and to search your file system you can use fsck

man badblocks
man fsck
Old 09-29-2003, 04:11 PM   #3
LQ Newbie
Registered: Sep 2003
Location: S. Hamilton, MA USA
Distribution: RH 6.2, 8.0
Posts: 29

Original Poster
Rep: Reputation: 15
So how do I get fsck to use badblocks?

I manually ran badblocks from root on the / filesystem, physical drive /dev/hda3.

It came up with three bad blocks.

How do I get fsck to recognize these, move whatever is on these blocks somewhere else, and make sure the file system doesn't try and use these blocks any more?

I ran shutdown -rF, and it ran fsck on all the drives at boot time without any problem. I want to try and force fsck to do a full badblock check on all the partitions, and fix whatever's underneath, ideally at reboot time, when nothings mounted.

How would I do that?

Thanks in advance,

Old 09-30-2003, 08:24 AM   #4
LQ Newbie
Registered: Sep 2003
Location: S. Hamilton, MA USA
Distribution: RH 6.2, 8.0
Posts: 29

Original Poster
Rep: Reputation: 15
Using e2fsck

I dug around in the docs, and found the following possible command, and was wondering if this would do the trick:

e2fsck -cypf /dev/hda3

I _think_ this should:
  • c - run badblocks
  • y - say yes to all questions
  • p - preen/repair the filesystem
  • f - force checking

Now, my only problem is how to unmount the root directory. It seems that when the system is running, there are several programs that have open files, which makes it impossible to unmount "/".

My questions are:
  1. Is the above command correct to do what I want to do (identify badblocks, fix the file system, mark the blocks as unusable)?
  2. How do I get the system in a state where I can safely execute that command?


Charlie Peppler

Last edited by cpeppler; 09-30-2003 at 08:26 AM.
Old 10-01-2003, 06:12 AM   #5
Registered: May 2003
Location: Canberra, Australia
Distribution: openSUSE 11.3
Posts: 445

Rep: Reputation: 31
I can't help you with the first question, but to answer your second question, you need to boot your computer in rescue mode. This explains how you do that:


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 do i do a diagnostic? krt47 Mandriva 2 10-19-2005 12:46 PM
hardware diagnostic utilities JazzItSelf Linux - Hardware 1 04-03-2004 11:14 AM
diagnostic utilities mrweirdo Linux - Software 0 03-04-2004 12:46 AM
gui & disk spanning for compression utilities mleschis Linux - Software 2 12-30-2003 02:38 PM
I need a full root/boot disk with all utilities, can anybody help? gbolly_bolly Linux - Software 3 04-25-2002 09:00 AM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:42 AM.

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
Open Source Consulting | Domain Registration