Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have recently upgraded a number of our servers. We are now left with a few servers we are ready to hand back to our data center.

Anyone know what is the best way to do a final self destruction of all the data on these servers before handing them back?

We obviously dont want to physically harm the servers, just purge, as permanently as possible all of our data on these boxes.

share|improve this question

migrated from stackoverflow.com Sep 20 '11 at 5:37

This question came from our site for professional and enthusiast programmers.

closed as off topic by Ward, Wesley, Iain, Scott Pack, Shane Madden Sep 20 '11 at 15:34

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Belong on superuser but you can find utilities to zero write all the hard drives –  Jesus Ramos Sep 20 '11 at 5:24
1  
Three votes to close as off-topic. Why? Isn't this part of a sysadmin's job? I've personally have to sanitise many hard drives as part of my duties. –  John Gardeniers Sep 20 '11 at 9:04
1  
This seems like an appropriate question here (I run into this question several times a year in my job), and I don't see any good reasons why it was closed. Voting to reopen. –  Stefan Lasiewski Sep 27 '11 at 0:02

5 Answers 5

up vote 4 down vote accepted

I endorse all the other recommendations for DBAN, but if you really can't do this, I've had a lot of success with shutting down as many services as I can (esp. the windowing system), then doing

dd if=/dev/urandom of=/dev/sda bs=1000k

from a root shell prompt, sitting back, and waiting. This basically writes pseudorandom bytes, a megabyte at a time, all over /dev/sda (you may need to use /dev/hda or other device as appropriate to your setup).

Because the kernel and the tool are in-core, the system will stay up for a surprising amount of time while this is running, and it leaves an utterly unbootable and mostly-completely-scrambled system behind it.

share|improve this answer
    
DBAN is the obvious choice when circumstances permit. Unfortunately not in our case. That is why I chose this as the best answer. –  anonymous-one Sep 7 '12 at 9:30

You should use the shred program from GNU coreutils.

One thing I've found to be useful, if you want to avoid "cutting the branch you're sitting on", is to create an initramfs image that includes shred, then burn that onto a bootable CD.

share|improve this answer
    
i will look into using this + find to exec shred on all important components of the servers. –  anonymous-one Sep 20 '11 at 5:34
1  
I like that analogy: "cutting the branch you're sitting on"! –  Austin ''Danger'' Powers Apr 5 '13 at 18:03

If you're interested in a bootable solution, I would suggest checking out DBAN

share|improve this answer
    
nice tool! did not know about this. we wont be able to use this as getting them to burn this, boot it for us, etc, will be a headache. but will definatly keep this in mind for the future! thanx. –  anonymous-one Sep 20 '11 at 5:33

If you're really worried about it, simply have them ship you the physical hard drives, then destroy them yourselves.

share|improve this answer
    
agreed. and take note of the serials numbers before and after to make sure its the same drives :) –  Sirex Sep 20 '11 at 6:56
1  
@Sirex, and the SMART diagnostic power-on-time values! –  bdonlan Sep 20 '11 at 18:18

Do you have (remote) access to server console before booting? You can add DBAN to grub.conf and run it from grub menu (use kernel=dban.bzi with dban.bzi copied from downloaded ISO file).

Wiping disk from under running system isn't reliable - you can never know if system wouldn't crash in the middle leaving you with an unbootable and unaccessible, but not quite cleared system.

share|improve this answer
1  
+1 Elegant! I didn't know one could do that. –  MadHatter Sep 20 '11 at 6:53
    
Perhaps you could even set DBAN as the default boot image. I'm not sure if it can be made to wipe a drive or set of drives without human intervention, but if it can (through boot command line parameters) then that may be a workable approach. –  Michael Kjörling Sep 20 '11 at 7:54
1  
@Michael Kjörling: You can with kernel=dban.bzi nuke="dwipe --autonuke" but you'll have no confirmation of successful wipe and you'll have only one try — you wouldn't be able to boot back to system even if it was not properly wiped. –  Tometzky Sep 20 '11 at 9:03

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