LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Erasing Hard Drive with dd taking waaayyyy too long (https://www.linuxquestions.org/questions/linux-hardware-18/erasing-hard-drive-with-dd-taking-waaayyyy-too-long-196595/)

mtrisk 06-22-2004 09:01 PM

Erasing Hard Drive with dd taking waaayyyy too long
 
Ok, so I have an 80GB Western Digital I just bought. I put Linux on it, and I want to reinstall with a fresh-right-out-of-the-box feeling. So I did:

Code:

dd if=/dev/zero of=/dev/hda
From a Knoppix CD. That was over Four hours ago. I have done this previously with a 20GB HD, and it took only half an hour. I'm afraid to touch it. What should I do? Leave it running, or reboot and try again?

2damncommon 06-22-2004 09:34 PM

If you do a "CTRL-C" the operation will halt. The part of your disk that is already zeroed will remain zeroed. The rest will not be.
I am surprised your 20 GB disk did not take longer.
Here is a floppy disk wipe tool, probably not any faster, but easy to use.

jwstric2 06-22-2004 10:11 PM

When using dd you should specify reasonable block sizes to use. The reason the command
dd if=/dev/zero of=/dev/hda takes so long is it write 1byte at a time (EOF char). Writing one byte at a time is very cpu intensive and very inefficent to the disk. Try the following below and feel free to mess with either count or bs (block size).

Try
dd if=/dev/zero of=file bs=2560000 count=1

vs

dd if=/dev/zero of=file bs=1 count=2560000


For 80 gigs a fairly reasonable would be to have bs=32768 (32 KB) or much larger multiple of 2.

mtrisk 06-23-2004 01:20 AM

Heh. I tried Ctrl-C, and the box didn't respond. In fact, it didn't respond to Alt-Ctrl-Del or any other keys as a matter of fact. I won't mess with it further, but I checked it with cfdisk and it appeared it started out ok, since it gave me the message about the first byte being zero. I'm going to reinstall Linux on it, so I should be ok.


All times are GMT -5. The time now is 12:16 AM.