# This script may be used from the rescue environment
# to run a "write" badblocks against the first IDE drive.
# ALL DATA WILL BE LOST.
# Author: Randolph R. Russell <rrussell@redhat.com>
# $Id: wipeme,v 1.1.2.1 2007/07/24 15:43:18 jhoffman Exp $

echo 'ALL data will be wiped off of /dev/hda!!!'
echo -n "Are you sure you want to do this [y/N]?? "
read REPLY
[ "${REPLY}" = "y" -o "${REPLY}" = "Y" ] || exit 1
BLOCKS=$(cat /proc/ide/hda/capacity)
mknod /dev/hda
badblocks -svw /dev/hda $BLOCKS

