Re: Wiping a disk partition

From: Dewayne Geraghty <dewayne_at_heuristicsystems.com.au>
Date: Thu, 26 Jun 2025 05:39:36 UTC
Hi Washington,

MAGNETIC Media
I wasn't familiar with David's approach so I visited the "Australian 
Defence Signals Directorate's" ISM Manual
"The Advanced Technology Attachment (ATA) secure erase command was built 
into the firmware of post-2001 non-volatile magnetic hard drives and is 
able to access sectors that have been added to the growth defects table. 
(ie bad sectors)"  which is good news.  Thanks David for the explanation.

FLASH Media
Also the ISM states for: "For non-volatile flash memory media, a 
technique known as wear levelling ensures that writes are distributed 
evenly across each memory block. This feature necessitates non-volatile 
flash memory media being overwritten with a random pattern twice as this 
helps to ensure that all memory blocks are overwritten".  So dd is a 
good solution as mentioned by others.

There's a plethora of standard and methods (NIST SP 800-88 Guidelines 
for Media Sanitization, p32-35 is useful), but this is sufficient.

PS I reference the ASD ISM because its widely required in my location 
(Australia) and follows NIST800-53r pretty well.