Linux Scandisk equivalent.
What is the equivalent in Linux for scandisk in Windows? The Linux program that I need is one that will check the hard drive sector by sector and that will identify and mark out any bad sectors that are found.
|
badblocks or fsck
you'll find them in /sbin |
Next questions: when running as root, fsck and badblocks both say that running them while the file system is mounted will cause severe damage to the file system (i.e. the hard drive). The questions are: (1) how does root unmount the hard drive?; (2) how are badblocks and fsck accessed while the hard drive is unmounted?; (3) how is the hard drive remounted?.
|
1. the command: umount /dev/hda1 will unmount partition hda1. Wherever / is, is where you would unmount, however: you can't unmount it while using applications from it :) My / partition is at /dev/hda3. You can find this by doing: cat /proc/partitions.
I have not used either fsck or badblocks yet as my filesystem is always unmounted cleanly thanks to UPS and some good luck ;) I'm sure there is an easier way to run fsck, but you could create a bootdisk, boot from it and run a scan while the drive/partition is not mounted. |
i think it i safe to run fsck if u could remount / as read-only but dont take my word for it. u'll need to shutdown every daemon and process (eg syslog)
that writes to the disk before remounting though. |
Sounds like another job for Tom's Root/Boot. It's still one of the best rescue/recovery disks out there. Unless you don't have a floppy drive, then get Knoppix or Slackware Live.
Enjoy! --- Cerbere |
or alternatively you could just boot into rescue mode from your mandrake disc
|
to check your root system:
Code:
telinit 1 # single user mode, closes all programs + network |
All times are GMT -5. The time now is 11:54 PM. |