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.

I've got an original Asus Eee PC Netbook that I'd like to sell. When I've sold old computers in the past, I've typically done a deep/secure/zeroing out style format. How can I do this on a Linux Netbook? I'm looking for

  1. The command that will let me do this

  2. Advice on how I can do this on a device with (seemingly?) non-removable media

Thanks in advance!

share|improve this question
add comment

5 Answers 5

up vote 15 down vote accepted

Another one you can use is DBAN.

share|improve this answer
    
Gotta love DBAN, even if it's just for the name! –  Mark Henderson Aug 3 '09 at 3:49
1  
Just remember that most of those methods are almost pointless on today's hard drives, and ~2 passes of random data are usually enough. –  grawity Aug 3 '09 at 8:24
1  
@grawity, 0, 1, random (in any order) is a slightly better idea. But your still correct that most DR places aren't going to find anything more than the random data. –  Chris S Oct 13 '10 at 15:11
add comment

Is the NSA going to take your machine apart and is ready to spend man weeks recovering your data?

No?

Then just dd if=/dev/zero of=/dev/sda bs=1M or rather (as we are not logged in as root) sudo dd if=/dev/zero of=/dev/sda bs=1M

Might want to be booted single user, or from another device, but I suspect it doesn't matter (tiny chance the machine would crash before you finished writing, but I doubt it).

Machine disk sda will be all 0s, and unrecoverable. Given the way SSDs work, there probably will be some unreachable blocks, that you'd need a utility to get, but they will not be readable with normal tools.

Given that you don't overwrite data on SSDs, you write data, and the drive erases the area via hardware commands, and then writes your data on the new blank area (BIG oversimplification here), I suspect the overwrite a zillion times thing buys you nothing (and all that is just so the NSA cannot take your drive apart and read it with a scanning electron microscope or the like) as the tech is quite different with a SSD.

share|improve this answer
add comment

boot from any live distro, fire up a a texteditor of your choice and write following piece of code into it, save and run:

#!/bin/bash
$DRIVE = /dev/sda # change this to your hard drive you wanna erase
$COUNT = 0
$TIMES = 16 # change this to reflect your state of paranoia =)
while [ $COUNT -lt $TIMES ] : do
    dd if=/dev/zero of=$DRIVE && dd if=/dev/urandom of=$DRIVE
    COUNT = $[$COUNT+1]
done
dd count=1 bs=1024 if=/dev/zero of=$DRIVE # erase the first 1megabyte to clear the MBR and partition table
share|improve this answer
add comment

As Gardeniers suggested, DBAN is likely what you want. It has great hardware support, so it will likely work with your controller, and is easy to use. I have used it for years to sanitize drives containing case data. The interface is simplistic, yet easy to use. Plus it will run from a usb flash drive, making your life much easier.

share|improve this answer
add comment

First create a live Linux installation on a USB drive (instructions).

Then boot off that USB Linux installation and run:

shred -vfz -n 100 /dev/hda

You can change 100 to whatever number of passes of zero writes you want ("z" is specifying zero writes). The "f" parameter overrides any permissions issues. "v" is verbose. /dev/hda should be your hard disk (or it could be /dev/sda if you are using SATA). You can use sudo fdisk -l to get the drive listing to make sure what you should use instead of (/dev/hda).

share|improve this answer
    
+1 for Shred –  Avery Payne Aug 1 '09 at 23:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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