LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 06-22-2004, 10:01 PM   #1
mtrisk
LQ Newbie
 
Registered: Jun 2004
Location: Los Angeles
Distribution: Debian Sarge, Fedora Core 4
Posts: 5

Rep: Reputation: 0
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?
 
Old 06-22-2004, 10:34 PM   #2
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: Debian Wheezy
Posts: 2,839

Rep: Reputation: 48
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.
 
Old 06-22-2004, 11:11 PM   #3
jwstric2
Member
 
Registered: Jan 2004
Posts: 105

Rep: Reputation: 15
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.
 
Old 06-23-2004, 02:20 AM   #4
mtrisk
LQ Newbie
 
Registered: Jun 2004
Location: Los Angeles
Distribution: Debian Sarge, Fedora Core 4
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
best way to find out what is taking up the bulk of your hard drive space? dr_zayus69 Linux - Software 2 06-30-2005 08:51 AM
Hotplug is taking so long longnam Slackware 3 03-28-2005 09:16 AM
Why is Resolving taking so long? DevilDust Linux - Networking 11 08-09-2004 12:55 AM
why is x taking so long to get desktop up camp freddie Debian 5 05-15-2004 07:58 AM
Hard drive mounted in read only (After long uptime...) otjervaag Linux - Laptop and Netbook 10 10-04-2003 09:34 PM


All times are GMT -5. The time now is 04:03 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration