fixed... i changed it to: ./smartctl.bin

the attached script are corrected and requires:

smartctl.bin , hdparm.bin and the script are located in /tmp and are chmodded to 755

./smartctl -S on /dev/hdX and
./smartctl -t long /dev/hdX

must be run before the script (replace X with either a or c if you have two drives)

so to repair a two drive setup, connect via serial and:

1. hit ctrl+c
2. change dir to /tmp
3. enter these commands in sequence:

./smartctl -S on /dev/hda
./smartctl -t long /dev/hda
./smartctl -S on /dev/hdc
./smartctl -t long /dev/hdc
./fix_bad_sectors.sh /dev/hda
./fix_bad_sectors.sh /dev/hdc

(remeber to see how long it takes to complete each of the long tests before you move on to the next command)


Attachments
fix_bad_sectors.sh (340 downloads)
hdparm.bin (257 downloads)
smartctl.bin (236 downloads)



Edited by Boelle (31/05/2008 23:22)
Edit Reason: cosmetics
_________________________
the "monkey" who learned to check a harddrive