Find out your hard disk for the disk dev id - look under ''Filesystem'' when you run this and identify your disk
<code>
df -h
</code>

If your hard disk is /dev/sdc1 then run
<code>
sudo badblocks -v /dev/sdc1
</code>

If there are bad blocks, then save the bad block numbers in a file
<code>
sudo badblocks /dev/sdc > bad-blocks
</code>

Feed the file into the FSCK command to mark these bad sectors as ‘unusable’ sectors.
<code>
sudo fsck -l bad-blocks /dev/sdc
</code>

If there are two many bad blocks, it would be better to change the hard disk or copy out the data and low-level format the disk..

=== LOW LEVEL FORMAT ===
You need to have ''hdparm'' installed.\\
Send a capital ''i'' option.\\
<code>
sudo hdparm -I /dev/sdc
</code>
for a device on sdc\\

If the drive shows "frozen" you must first "un-freeze" it. What you need to do to "un-freeze" it depends on the device. Most devices will "un-freeze" if you put the system to ''suspend to RAM'' mode, then wake it up again. If the device shows "not frozen", you can proceed.
<code>
sudo hdparm --user-master u --security-set-pass llformat /dev/sdc
</code>
Then show the device info again with the capital ''i'' as parameter.
<code>
sudo hdparm -I /dev/sdc
</code>
It should now display "enabled" under ''Security:''. This is quite a critical step. The device is now secured. If you power it down, it will lock and might become inaccessible. When you perform the low-level format NOW, security will be disabled again and you can continue using the device.
<code>
sudo hdparm --user-master u --security-erase llformat /dev/sdc
</code>
The device should now be physically wiped.
<code>
sudo hdparm -I /dev/sdc
</code>
Once more with the capital ''i''. Confirm that security has returned to "not enabled". You can now partition and format the device.

=== Wipe Disk with Zeros ===
Just run
<code>
dd if=/dev/zero of=/dev/sdc
</code>
or to just zero the MBR
<code>
dd if=/dev/zero of=/dev/sda bs=446 count=1
</code>
or wipe out MBR and partition table
<code>
dd if=/dev/zero of=/dev/sda bs=512 count=1
</code>
May need to use ''sudo''