cancel
Showing results for 
Search instead for 
Did you mean: 

Erase Hard Drives

Ragni Singh
Super Advisor

Erase Hard Drives

Hello, what's the best way to erase data of a hard drive. It currently has Linux OS installed.

Make the system unbootable.

Thanks and points will be assigned.
9 REPLIES
Shoghi Martinez G.
Honored Contributor

Re: Erase Hard Drives

Use a linux live CD boots an get a terminal window and use the dd command : dd if=/dev/zero of=/dev/hdx bs=1k

hdx is the hard drive device file, change it.




Ragni Singh
Super Advisor

Re: Erase Hard Drives

Actually, that doesn't work. I run parted.....rm..then minor number.
Jared Middleton
Frequent Advisor
Ben Stokes
Frequent Advisor

Re: Erase Hard Drives

I use DBAN : http://sourceforge.net/projects/dban/

Very flexbile and offers quite a few options depending on your security requirements - if your data was particularly sensitive you can use the most paranoid option which writes random patterns of ones and zeros over the disks several times over.
Ivan Ferreira
Honored Contributor

Re: Erase Hard Drives

The 'shred' command normally is used for this purpose.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Don Vanco - Linux Ninja
Regular Advisor

Re: Erase Hard Drives

DBAN - meets a number of cert requirements, including (I believe) one from the DOD. We've hooked a server up to a SAN and blasted it in its entirety.
Hemmetter
Esteemed Contributor

Re: Erase Hard Drives

Hello,

for me the method with "dd" is the best because it is straight 'n easy.

And it is good enough for securely delete any diskdata.

See that interesting article on heise online:
http://www.heise-online.co.uk/news/Secure-deletion-a-single-overwrite-will-do-it--/112432


rgds
HGH
Fredrik.eriksson
Valued Contributor

Re: Erase Hard Drives

Well, as dennis said, shred is usually used... this is because writing the entire disk with 0's won't make it "unrestorable".. shred overwrites with useless and random data, and I believe the default amount of times written is 25. This is not 100% secure either, but it makes it alot more expensive to restore the drive :P

You could imitate this by using dd with if=/dev/urandom but this will take very long and use alot of cpu.

Another alternative if you just want it to be unbootable but you want to reuse the disk, then I would just recommend booting on a live cd (or rescue) and run a partition editor like cfdisk and remove the partitions... This won't clear the MBR thou so if you have a LILO or GRUB in your MBR that will remain...

According to this forum post: https://www.linuxquestions.org/questions/linux-general-1/wiping-mbr-197530/
This would work to clean the mbr also (hda being the drive you have your MBR on):
dd if=/dev/zero of=/dev/hda bs=512 count=1

Best regards
Fredrik Eriksson
Maaz
Valued Contributor

Re: Erase Hard Drives

I also agree with those who recommend 'dd'

as I have used 'dd' to erase disk and use 'foremost' to recover the data, and failed

and same goes with shred.

i.e 'dd' and 'shred' both erases the disk, so that most of the data recovery software doesn't able to recover

Regards