Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Good command for wiping a hard drive?
Date: Fri, 30 Sep 2005 21:39:05
Message-Id: 433DAF69.5060700@asmallpond.org
In Reply to: [gentoo-user] Re: Good command for wiping a hard drive? by Remy Blank
1 Remy Blank wrote:
2
3 >Mark Knecht wrote:
4 >
5 >
6 >> Sold my laptop on Ebay. It was dual boot Gentoo/XP Pro and had
7 >>financial data on it. I'd like to pretty securely wipe the drive
8 >>before shipping. I've already deleted all 10 partitions and written
9 >>new partitions on which are different sizes and different file
10 >>systems. What simple command can Ido to write data to the whole drive?
11 >>
12 >>
13 >
14 >Assuming your hard disk is /dev/hda, I'd do:
15 >
16 > dd if=/dev/zero of=/dev/hda bs=8M
17 >
18 >Then go have a coffee. If you want it more secure, go for this, a few
19 >times in a row (at least 7, I read):
20 >
21 > dd if=/dev/urandom of=/dev/hda bs=8M
22 >
23 >However, this will take a *long* time, as /dev/urandom is quite slow.
24 >But it will make the data unrecoverable even with expensive means.
25 >
26 >
27
28 A good option for more speed would be to use aespipe to encrypt
29 /dev/zero and write that output to the disk. Since AES encryption
30 generates essentially random data, this should be the equivalent of
31 reading from urandom, only much much faster. You still have to run it
32 multiple times of course, and with a different encryption key each time,
33 but commands like this should do the trick:
34
35 head -c 45 /dev/urandom | uuencode -m - | head -n 2 | tail -n 1 > key.txt
36 dd if=/dev/zero bs=64k | aespipe -p3 -e AES128 3<key.txt >/dev/hda
37
38 -Richard
39
40 --
41 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Re: Good command for wiping a hard drive? Alexander Skwar <listen@×××××××××××××××.name>