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 |
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. |
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. |
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. |