My external backup drive broke recently. It just beeps but does not show up in Explorer but in Device Manager.

Sadly this drive contains my unencrypted backups. (Not a failure I will repeat). Is there a way to wipe this drive without physically destroying it before I send it back to my mail order company?


The ATA Interface seems also broken.

#>hdparm -I /dev/sg2

SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

ATA device, with non-removable media
    Likely used: 1
    Logical     max current
    cylinders   0   0
    heads       0   0
    sectors/track   0   0
    Logical/Physical Sector size:           512 bytes
    device size with M = 1024*1024:           0 MBytes
    device size with M = 1000*1000:           0 MBytes
    cache/buffer size  = unknown
    IORDY not likely
    Cannot perform double-word IO
    R/W multiple sector transfer: not supported
    DMA: not supported
    PIO: pio0

ddrescue fails because the drive is not seekable and dd if=/dev/zero of=/dev/sdb bs=4K conv=noerror,notrunc,sync only copies 4 kb

  • It shows up in device manager? Are you sure there's no other way to gain access? – multithr3at3d May 1 '18 at 15:39
  • yes it does, but everything i want to do with it there (disable,...) leads to a timout like behaviour. Device manager freezes. It does not show up in discmgmt. Let it plugged in during boot also lead to a timeout / freezing behaviour of the BIOS. However it does spin up but then it makes repeating strage sounds until it finally spins down only to repeat again. So yes I am not aware of a method interacting with it. – Ohmen May 1 '18 at 15:54
  • Well is it /dev/sg2 or /dev/sdb? – forest May 3 '18 at 0:51
  • yes it is /dev/sg2 double checked it. It is the one disk which shows up after plugging in. – Ohmen May 3 '18 at 12:12

Chances are you will have to destroy the drive.

If the internal components of the hard drives are physically damaged, you cannot wipe it short of using destructive methods such as melting or degaussing (exposing it to an extremely powerful alternating magnetic field). You can try issuing the ATA Secure Erase command which tells the controller to do low-level data erasure without actually sending I/O commands from the host, but it will not work if the drive is so badly damaged that the ATA protocol no longer works (which is likely).

Because degaussing involves incredibly powerful magnetic fields, it's not really something you can do at home with a permanent magnet, or even a cheap electromagnet. You will need to either rent a large degaussing machine, or more practically, send in the drive to dedicated hard drive destruction services that will degauss it for you before sending it back with a certificate of destruction. Note that degaussing does not leave any physically-identifiable marks or damage. If you are returning the drive because it doesn't work, then after degaussing, you'll still be sending it back in one piece.

  • OP might also be able to find a secure shred company that will shred his drive in front of him for a few bucks. – Adonalsium May 1 '18 at 20:30
  • 1
    Indeed, but you can't really return it to your "tropical rainforest mail order company" after shredding. – forest May 2 '18 at 0:20

Sometimes the data on drive is damaged, and Windows cannot recognize the drive, but it is there. On Linux and MacOS, you can write data even on an unrecognized drive by writing direct to the device.

If you have a Linux boot drive ready, you can use it to wipe the drive, but make sure you are erasing the correct drive. The next commands will wipe the drive without confirmation, so be sure to know which drive you will erase.

If ddrescue is available, and your backup drive is /dev/sdb, you can use:

ddrescue --force /dev/zero /dev/sdb

If ddrescue is not available, plain old dd can be used:

dd if=/dev/zero of=/dev/sdb bs=4K conv=noerror,notrunc,sync

This will write zeroes all over the drive, on every sector that is still writable. It will be enough to clear almost everything, and the remaining data will probably be on defective sectors, and too scattered around to be recovered.

  • You could also try to bypass the regular buffered I/O and instead issue a direct write command over ATA (I think hdparm can do this). To see if this would even work though, it might be a good idea to run a SMART test first, assuming the device even shows up. – forest May 2 '18 at 12:40
  • Thank you for the commands unfortunately did they only tell me that the drive is broken ... see edit – Ohmen May 2 '18 at 17:48

If you can't get any kind of I/O working to it you've got no way of writing to it. Without physically destroying it you can never be certain the data won't be recoverable.

Placing a large strong magnet next to the drive for several hours may decrease the chance of the data being recoverable however may also cause internal damage (I imagine you are hoping to send it back on warranty if you don't want to destroy it?).

Take this as a lesson to encrypt! (and ideally RAID).

  • -1 because using a house magnet is woefully ineffective for hard drives. It will often make the data unreadable, but it is still quite easy to recover. You need to use a magnetic field far more powerful than any permanent magnet can produce! Not to mention, magnetism will break a hard drive even without internal damage because it destroys the positioning tracks that are laid out in the factory. There is no way that you can use magnetism to wipe data from a drive without also destroying the drive. – forest May 1 '18 at 9:26
  • @forest - Where did I say house magnet? "Large strong" meant to infer hockey puck size neodynium - maybe I should have been more explicit. It takes ~1 Tesla to flip bits from write-head distance - magnets you can obtain online should theoretically be able to do it externally. I stated it does not guarantee destruction - however it may reduce the chance of data recovery whilst still allowing OP to return the drive - chances are OPs personal backup isn't likely to end up in the kind of forensics lab that can recover from a platter with no positioning tracks and potentially flipped bits. – Hector May 1 '18 at 10:52
  • A hockey puck sized pure neodymium magnet would still do very little to the data, although it would probably rip the write head out. – forest May 2 '18 at 0:06
  • @forest - if it takes ~1 Tesla to flip the bit and you have a magnet large enough to generate a field larger than this from the required distance how can you say so definitively "still do very little to the data"? – Hector May 2 '18 at 9:03
  • 1
    Let us continue this discussion in chat. – forest May 2 '18 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.