using dd to wipe a disk
- From: Peter <peter@xxxxxxxxxxxxx>
- Date: Sun, 21 May 2006 07:12:25 -0400
I know the command
dd if=/dev/urandom of=/dev/hda bs=? count=?
can be used to fill a disk with random bytes and is a good way to clean it
prior to recycling or reselling. However, it is slow due to the random
number generation.
Substituting /dev/zero makes it run around 22 times faster but is not
quite as secure. Which brings me to this question.
If I wanted to iteratively write a series of bytes, could be a pattern, a
small file of random numbers, or whatever, can I modify the command so
that if=filename or if=pattern is used over and over again whenever it's
input buffer is dry and until the disk is full or count reached?
I created a small 1kb random.seed file (much like init does as shutdown),
but all that would be done was 1kb of output.
dd if=my.random.file of=/dev/hda ibs=1K obs=1M count=(a lot for 30gb)
where count would be the number of input file blocks. But it only went
through once.
Or, would the badblocks program be a better substitute?
Feeback and comments appreciated!
--
Peter
.
- Follow-Ups:
- Re: using dd to wipe a disk
- From: Roger Leigh
- Re: using dd to wipe a disk
- From: Andy Burns
- Re: using dd to wipe a disk
- From: Lars Ljung
- Re: using dd to wipe a disk
- From: Gordon Henderson
- Re: using dd to wipe a disk
- Prev by Date: Re: Fed up FC4 ..
- Next by Date: Re: using dd to wipe a disk
- Previous by thread: Mass-storage device and automount?
- Next by thread: Re: using dd to wipe a disk
- Index(es):
Relevant Pages
|