Remy Blank wrote:

Mark Knecht wrote:
  Sold my laptop on Ebay. It was dual boot Gentoo/XP Pro and had
financial data on it. I'd like to pretty securely wipe the drive
before shipping. I've already deleted all 10 partitions and written
new partitions on which are different sizes and different file
systems. What simple command can Ido to write data to the whole drive?

Assuming your hard disk is /dev/hda, I'd do:

 dd if=/dev/zero of=/dev/hda bs=8M

Then go have a coffee. If you want it more secure, go for this, a few
times in a row (at least 7, I read):

 dd if=/dev/urandom of=/dev/hda bs=8M

However, this will take a *long* time, as /dev/urandom is quite slow.
But it will make the data unrecoverable even with expensive means.

A good option for more speed would be to use aespipe to encrypt /dev/zero and write that output to the disk. Since AES encryption generates essentially random data, this should be the equivalent of reading from urandom, only much much faster. You still have to run it multiple times of course, and with a different encryption key each time, but commands like this should do the trick:

head -c 45 /dev/urandom | uuencode -m - | head -n 2 | tail -n 1 > key.txt
dd if=/dev/zero bs=64k | aespipe -p3 -e AES128 3<key.txt >/dev/hda

-Richard

--
[email protected] mailing list

Reply via email to