using dd to wipe a disk



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
.



Relevant Pages

  • Re: New HDD Installation
    ... "John John" wrote: ... a single partition disk. ... confirm or change the active flag of the partition using the FDISK command. ... There are other ways to mark the partition active, either with a Windows ...
    (microsoft.public.windowsxp.general)
  • Re: Forgot to put old_rootvg to sleep before reboot - How to Wake
    ... Performs operations on existing alternate rootvg volume groups. ... To rename Alternate Disk Volume Group: ... The alt_rootvg_op command can be used to determine which disk is the ... flag) can be executed at this time. ...
    (comp.unix.aix)
  • PC8477 Demo Program
    ... The PC8477 Demo Program is designed to allow access to all software commands and registers of National Semiconductor's PC8477 Advanced Floppy Disk Controller. ... The left center indicates the number of bytes transferred during the last command issued. ...
    (comp.sys.ibm.ps2.hardware)
  • Re: Windows XP boot failure
    ... If you have a friend with a real Windows ... read/write to the drives using a command line ... For more information on a specific command, ... CHKDSK Checks a disk and displays a status report. ...
    (microsoft.public.windowsxp.basics)
  • Re: New HDD Installation
    ... DISKPART> list disk ... DISKPART> select partition 1 ... You can do the same thing starting with the "list volume" instead of the "list disk" command, then selecting volumes to gain focus. ... At this point I haste to point out that this is mostly for educational purposes and for you to gain an inner working knowledge of disks and partitions and how Windows works with them. ...
    (microsoft.public.windowsxp.general)