Results 1 to 9 of 9

Thread: Is their a better way to erase a drive then "sudo dd if=/dev/zero of=/dev/XXX"?

  1. #1
    Join Date
    Sep 2009
    Location
    Golden Valley, Arizona
    Beans
    152
    Distro
    Ubuntu 10.04 Lucid Lynx

    Is their a better way to erase a drive then "sudo dd if=/dev/zero of=/dev/XXX"?

    I've been searching around Google for a way to wipe a drive (fill it with zeros) in Ubuntu but the best I can find is "sudo dd if=/dev/zero of=/dev/XXX" with "XXX" being the drive you want erased, it seems to work but (1) it doesn't tell me stuff like KiBps, time remaining, percentage complete, etc, and (2) it will eventually crash my computer before completing for what reason I do not know because it's not erasing a system drive it's erasing a flash drive and it's unmounted.

    So does anyone know a better way to wipe drives in Ubuntu? Not by booting into DBAN, even though I love DBAN I need something that I can still use my computer while it's running, and preferably have a GUI or at least info in a terminal of when it'll complete wiping the drive.

    Also before someone says something about me wiping a flash drive will wear it out, yes I know it will but I think the flash drive is already wearing out and I wanted to completely wipe it to see if it helps any before I have to dig up the receipt to return it.

  2. #2
    wojox is offline I Ubuntu, Therefore, I Am
    Join Date
    Apr 2009
    Beans
    8,628

    Re: Is their a better way to erase a drive then "sudo dd if=/dev/zero of=/dev/XXX"?

    You can shred it.

    Code:
    man shred

  3. #3
    Join Date
    Jun 2009
    Location
    Open Linux Forums
    Beans
    2,710

    Re: Is their a better way to erase a drive then "sudo dd if=/dev/zero of=/dev/XXX"?

    you could also try to format it using gparted.

  4. #4
    Join Date
    Mar 2008
    Location
    England
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Is their a better way to erase a drive then "sudo dd if=/dev/zero of=/dev/XXX"?

    Quote Originally Posted by wojox View Post
    You can shred it.

    Code:
    man shred
    +1 for shred. much faster then dd.
    My Website. Computing resources, photos, articles etc.

  5. #5
    Join Date
    Sep 2009
    Location
    Golden Valley, Arizona
    Beans
    152
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Is their a better way to erase a drive then "sudo dd if=/dev/zero of=/dev/XXX"?

    Quote Originally Posted by Leppie View Post
    you could also try to format it using gparted.
    Yeah but that only reformats it, I'm looking to erase the drive to make it like it's brand new, or at least appear to be to the operating system.

  6. #6
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Is their a better way to erase a drive then "sudo dd if=/dev/zero of=/dev/XXX"?

    Quote Originally Posted by TheOnlyMrK View Post
    Yeah but that only reformats it, I'm looking to erase the drive to make it like it's brand new, or at least appear to be to the operating system.
    Then you use gparted to write a new partition table: Device-Create Partition Table.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  7. #7
    Join Date
    Sep 2009
    Location
    Golden Valley, Arizona
    Beans
    152
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Is their a better way to erase a drive then "sudo dd if=/dev/zero of=/dev/XXX"?

    Quote Originally Posted by dcstar View Post
    Then you use gparted to write a new partition table: Device-Create Partition Table.
    But that still doesn't wipe the drive, data can still be recovered if you use the right software.
    Anyways I will try using the "shred" command later tonight and see how it does.

  8. #8
    Join Date
    Sep 2009
    Location
    Golden Valley, Arizona
    Beans
    152
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Is their a better way to erase a drive then "sudo dd if=/dev/zero of=/dev/XXX"?

    Quote Originally Posted by wojox View Post
    You can shred it.

    Code:
    man shred
    I'm trying it now, it seems to be working fine so far except the info doesn't seem to update;

    Code:
    mike@mike-desktop:~$ sudo shred -v -z -n 0 /dev/sdc
    shred: /dev/sdc: pass 1/1 (000000)...
    shred: /dev/sdc: pass 1/1 (000000)...541MiB/7.6GiB 7%
    it's been like that for over 10minutes, but at least it doesn't eat my RAM till the computer crashes like dd does, instead I can see the RAM go up for a little then going back down ~10seconds later. So thank you.
    MB: MSI 890GXM-G65 - CPU: AMD Phenom II X4 965 Black Edition, Quad Core @ 3.4GHz - RAM: A-DATA 2GiB DDR3 1600 RAM, x2 = 4GiB @ 1333MHz - GPU: Nvidia GeForce 9800GTX+, 512MiB GDDR3 - HDD: Seagate Barracuda 7200.12, 500GiB @ 7200RPMs - 2 in RAID0

  9. #9
    Join Date
    Feb 2010
    Location
    Pittsburgh, PA, USA
    Beans
    219
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Is their a better way to erase a drive then "sudo dd if=/dev/zero of=/dev/XXX"?

    My vote goes to dban. I have some info about it on my blog...

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
  •