Since I am returning the HD to HP for a refund. How about putting a powerful magnet on top of the HD?
I've heard that works. I already formated both partitions so wouldn't the magnet do the trick of making everything
The instructions provided by StopSpazzing are correct and accurate. The reason to use DBAN is that it is easy (although, not the fastest). The reason to completely DISconnect the GOOD HDD and leave only the "BAD" HDD is to avoid any possible confusions or mistakes when using DBAN to select the specific HDD to be erased. Selecting "all HDD's" or "the only connected HDD" is faster, simpler and SAFER than having to decide which specific HDD you need to erase while avoiding the HDD that you do NOT want to erase.
If your HDD is REALLY having a technical problem, there is a chance that ANYTHING can make things worse.
If your HDD is NOT really having a technical problem (and HP will double-check whether it has a problem or not), then any adequate SOFTWARE method can be used.
Now, FORMATTING and/or PARTITIONING a HDD won't really erase the data contained in the HDD. Any "one pass" erase software *is* adequate and enough (you don't need any "7 passes" or anything DoD for your case).
But you are suggesting also to use a "hardware" method (magnet). Whether the HDD is actually having a technical problem or not, using a magnet can make the things much worse, and it could void your warranty.
If HP decides it, they can charge you for a new HDD AND also for the useless hardware check, if they find out that you used a magnet close to your HDD.
Hence, following StopSpazzing's instructions is your best option IMO.