WizardKit/.bin/Scripts/hw-diags-badblocks
2Shirt 7fbbde56c6 run_badblocks() working
* Re-added and updated hw-diags-badblocks
2017-12-27 04:01:54 -07:00

18 lines
301 B
Bash
Executable file

#!/bin/bash
#
## Wizard Kit: HW Diagnostics - badblocks
function usage {
echo "Usage: $0 device log-file"
echo " e.g. $0 /dev/sda /tmp/tmp.XXXXXXX/badblocks.log"
}
# Bail early
if [ ! -b "$1" ]; then
usage
exit 1
fi
# Run Badblocks
sudo badblocks -sv -e 1 "$1" 2>&1 | tee -a "$2"