Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: 'dd' command is taking more than 3 days to wipe 320GB HDD

  1. #1
    Join Date
    Oct 2009
    Location
    Sydney
    Beans
    4,301
    Distro
    Ubuntu 20.04 Focal Fossa

    Question 'dd' command is taking more than 3 days to wipe 320GB HDD

    Hi,

    I am using 'dd' command to wipe a 320GB HDD and write 0's using Lubuntu 13.10 LiveUSB.

    It has been 'more' than 3 days now and there is absolutely no hope the process will finish any time soon. The machine does response to anything as far as I can tell but I don't want to do anything and waste the 3 days of waiting.

    My Q is: is this normal? I have done this before (not with 320GB though) and it never took all these days so what do I have to do? suggestions are highly appreciated.

    Thank you!

  2. #2
    Join Date
    May 2009
    Location
    Fareham, UK
    Beans
    1,524
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 'dd' command is taking more than 3 days to wipe 320GB HDD

    Well a good start would be to tell us what command you used, if it uses /dev/random which is a popular one to totally blitz a hard drive then this will only work whilst you are using the machine because /dev/random generates entropy from mouse and keyboard input (and various other user controlled events) so if your doing nothing on the machine it can't continue.
    Catch me on Freenode - imark

  3. #3
    Join Date
    Oct 2009
    Location
    Sydney
    Beans
    4,301
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: 'dd' command is taking more than 3 days to wipe 320GB HDD

    Quote Originally Posted by CaptainMark View Post
    Well a good start would be to tell us what command you used, if it uses /dev/random which is a popular one to totally blitz a hard drive then this will only work whilst you are using the machine because /dev/random generates entropy from mouse and keyboard input (and various other user controlled events) so if your doing nothing on the machine it can't continue.
    Hi and thanks for your reply.

    Code:
    dd if=/dev/zero of=/dev/sdX

  4. #4
    Join Date
    Oct 2005
    Location
    Holland
    Beans
    938
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: 'dd' command is taking more than 3 days to wipe 320GB HDD

    I can't answer your question, but either your information is incomplete or it is wrong.
    You state that the output goes into /dev/sdX, where it should be the /dev that represents the hard disk you want to wipe (be very careful here, and first determine whether this is /dev/sdb or /dev/sdc or so, so you don't wipe the disk that contains your system).

    The dd command is dangerous and should be used very carefully.

    Topsiho

  5. #5
    Join Date
    Oct 2009
    Location
    Sydney
    Beans
    4,301
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: 'dd' command is taking more than 3 days to wipe 320GB HDD

    Quote Originally Posted by Topsiho View Post
    I can't answer your question, but either your information is incomplete or it is wrong.
    You state that the output goes into /dev/sdX, where it should be the /dev that represents the hard disk you want to wipe (be very careful here, and first determine whether this is /dev/sdb or /dev/sdc or so, so you don't wipe the disk that contains your system).

    The dd command is dangerous and should be used very carefully.

    Topsiho
    Hi and thanks for posting.

    Because it is dangerous (which I'm fully aware of), I didn't wish to replace X with the correct drive letter and decided to choose the general "X" instead. I don't want anyone to try that and then everything will disappear.

    There is only one drive so I'd assume you know now what I am talking about

  6. #6
    Join Date
    Nov 2013
    Beans
    Hidden!

    Re: 'dd' command is taking more than 3 days to wipe 320GB HDD

    Hello

    You can try :
    dd if=/dev/zero of=/dev/sdX bs=4096

  7. #7
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: 'dd' command is taking more than 3 days to wipe 320GB HDD

    I think your 3 days have been wasted already - zeroing a 320GB drive should take hours, not days.

    If you want to start over and get some feedback from the terminal, I'd suggest using shred. There are ways of getting verbose output from dd I believe, but not straightforwardly, whereas shred has a -v option built in. For a single pass writing zeroes, you could do it this way:

    Code:
    sudo shred -vzn 0 /dev/sdX
    Obviously, substitute your actual device for sdX. The Options:

    -v - verbose output - you can actually see whether something is happening.
    -z - add a final overwrite with zeros.
    -n - overwrite N times instead of the default (3). If you make this zero, then you get just the one pass with zeroes.
    Ubuntu 20.04 Desktop Guide - Ubuntu 22.04 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags

    Member: Not Canonical Team

    If you need help with your forum account, such as SSO login issues, username changes, etc, the correct place to contact an admin is here. Please do not PM me about these matters unless you have been asked to - unsolicited PMs concerning forum accounts will be ignored.

  8. #8
    Join Date
    Oct 2009
    Location
    Sydney
    Beans
    4,301
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: 'dd' command is taking more than 3 days to wipe 320GB HDD

    Quote Originally Posted by jeanjd63 View Post
    Hello

    You can try :
    dd if=/dev/zero of=/dev/sdX bs=4096
    Hi and thanks for posting.

    I have always tried 'dd' this way:
    Code:
    dd if=/dev/zero of=/dev/sdX
    And it always worked.

    It is just this time, something is odd and wrong.

  9. #9
    Join Date
    Oct 2009
    Location
    Sydney
    Beans
    4,301
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: 'dd' command is taking more than 3 days to wipe 320GB HDD

    Quote Originally Posted by coffeecat View Post
    I think your 3 days have been wasted already - zeroing a 320GB drive should take hours, not days.
    Hi and thanks for posting.

    Seriously? oh, this is really bad. I should have asked this 2 days ago
    How can we tell whether it is doing nothing or not? anyway to check without cancelling or stopping it?

    If you want to start over and get some feedback from the terminal, I'd suggest using shred. There are ways of getting verbose output from dd I believe, but not straightforwardly, whereas shred has a -v option built in. For a single pass writing zeroes, you could do it this way:

    Code:
    sudo shred -vzn 0 /dev/sdX
    Obviously, substitute your actual device for sdX. The Options:

    -v - verbose output - you can actually see whether something is happening.
    -z - add a final overwrite with zeros.
    -n - overwrite N times instead of the default (3). If you make this zero, then you get just the one pass with zeroes.
    If that will work 'faster' and 'better' than my way, I'm indeed interested to try this one.

    I am sorry, I might be mistaken for not mentioning this but the reason why I am trying 'dd' is there are 1421 bad sectors and that machine is running Windows but it was keep stop working and my neighbour gave it to me to check and I was trying to convert it to Linux but thought to fix the bad sector before.

    Yes, I have tried 'dd' with a very very old 4.1 GB HDD which had bad sector and it got fixed with 'dd', the same command that I am trying with this 320GB HDD.

    So, what shall I do now?

  10. #10
    Join Date
    Sep 2005
    Beans
    1,596
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: 'dd' command is taking more than 3 days to wipe 320GB HDD

    Are you running dd or sudo dd or are you running dd as root? Without root or acting as root (sudo) it won't do anything as root is needed to fully access the drive. A plain user can only access what permissions it was given to which isn't block level writing.
    MBA M1 - M1 8GB 256GB - macOS Monterey
    MSI GL65 - i5-10300H 16GB 512GB GTX 1650 Windows 11
    Galaxy Book Go - Snapdragon 7c Gen 2 4GB 128GB Windows 11

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •