Jump to content

how to check my hardisk for errors or badsectors ?


Recommended Posts

Well... in windows you would use the obvious scandisk app...

 

Mandrake checks the filesystem every x-number of boots, so I don't think that that should worry you that much... Although! Might you want to check you linux file-systems manually you could use the 'fsck' application that can be found in the console --> Type 'man fsck' in the console for more info.

 

I hope to have informed you enough with this all...

 

 

Sean

Link to comment
Share on other sites

if you want to check your drive, and not just the partitions/filesystems, you'll want to go to the homepage of your hard drive manufacturer and they should have a program that you put on a floppy disk, boot with it, and run checks on it. this is the best way to detect problems with your drives, as the drive maker will know it better than either windows -or- linux ;)

 

think of it as: who would you rather have fix your car, the local motorhead who's fixed a variety of cars, or the guy down at the garage that specializes in your specific make of car?

Link to comment
Share on other sites

If hda5 is / and hda6 is /home (assuming) then you can

as root

 

umount /home

to do this /home shouldnt be in use .... so you cant be logged into X as a user. The best way is therefore

in X as root in a console

/etc/init.d/dm stop

 

this should drop you to a CLI prompt.

 

then

fsck /dev/hda6

should run it.... you should check the options in man fsck

also remember fsck runs a different program according to the filesystem (ext2,ext3,xfs etc) and the exact option depend on the filesystem.

 

unmounting / is more difficult

 

the simplest way ... is to reboot

then you have two options....

you can force the kernel to do a fsck before it mounts rw or you can mess about using chroot and a rescue disk. The former is the easiest....

 

You should check /etc/fstab file ... the last entry on the /dev/hda5 / line should be 1 - certainly not 0 - so long as its not zero

shutdown -r -F now

should FORCE checking

 

 

alterantive... is to reboot with RL 1 then umount -a and mount /dev/hda5 / -o ro

(this is more complex)

Link to comment
Share on other sites

  • 3 weeks later...

Are you sure its not 4% non-contigous? If so this is nothing to worry about - 4% contigous would mean your file system is an absolute mess however.

 

Like tyme mentioned in his post, use your HDD manufacturers tools to scan your disc for errors if you're really worried.

Link to comment
Share on other sites

  • 2 weeks later...

I don't think it's too good idea to turn on/off the computer without proper reboot just to force the check. The best would be just to leave the system to do it itself. EXT3 is a jurnalized file system. It means that in case of crash - power outage etc it should restore itself from the jurnal. I remember I read about the message that pops up when Mandrake starts and it asks if you would like to force hard drive check. And by doing this the user in fact disable the jurnal for recovery purpoces. Also the swap file is located on a separate partitition - it means that fragmenting of the files is down to minimum. However if you do want to experiment how FSCK works you may want to learn first how to boot to level 3 (no X - GUI) and then restore to level 5. Read man fsck, man init, man mount, man fstab

good luck!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...