Find the answer to your Linux question:
Results 1 to 10 of 10
Hi folks, OS Linux/Windows What will be an easy and reliable way to completely erase a hard drive excluding with a hammer. I have several 40G IDE Hard drives, running ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778

    How to erase data completely on HD


    Hi folks,

    OS Linux/Windows

    What will be an easy and reliable way to completely erase a hard drive excluding with a hammer.

    I have several 40G IDE Hard drives, running Linux or Windows, for disposal. A friend of mine needs them. I want completely erase all data before delivering them to him. Googling "How to completely erase a hard drive" brought me many suggestion. Please advise. TIA

    B.R.
    satimis

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,757
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  3. #3
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778
    Hi,

    Thanks for your advise.

    I will down following iso:
    Darik's Boot and Nuke
    dban-2.2.6_i586.iso

    I suppose the CD burnt will boot the PC and erase the data on the HD disregarding the OS installed?

    Setup on PC:-
    Only the HD to be erased will be connected on the PC. The default HD will be disconnected temporarily.

    B.R.
    satimis

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,380
    Get a quick-load USB disc enclosure, install and connect the drive (don't mount it). Note what device id is given it (/dev/sdX where X is some letter). Then, use the 'dd' command to erase it. For example, if the drive is /dev/sdh, you would do this (as root):
    Code:
    dd if=/dev/zero of=/dev/sdh
    This will write zeros to the entire disc. This is not a certifiable forensic wipe of the drive, but it will certainly be adequate for your purposes.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,757
    Quote Originally Posted by satimis View Post
    I suppose the CD burnt will boot the PC and erase the data on the HD disregarding the OS installed?
    I haven't used that tool. I guess I should erase everything including installed OSes.

    Rubberman's suggestion is also a good one. - Though I would suggest use random.
    dd if=/dev/random of=/dev/sdh
    If you think you have lot of time , then use live CD and mount these partitions and then use
    "shred" command,to make content disk completely wiped out.

    Having said that , in most case using simple dd,should be enough . Unless you are trying to hide a content from CIA
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,380
    Lakshmi's suggestion of using /dev/random is a good one. I simply use /dev/zero myself when wiping discs that I want to use to install a new OS or give to someone else. In any case, either will work just fine. As I said, this will wipe the disc from casual access of the old data, though REALLY sophisticated tools can dig it out. The NSA requires that wiped discs be over-written 7 times with random bit patterns and then null bytes to be certifiably "clean". That's ok for small devices like your 40GB ones, but takes a HUGE amount of time for bigger discs like todays' 1+ TB size devices. So, if a 40GB disc takes 5 minutes to wipe once, and 35 minutes to wipe 7 times, a 1.5 TB disc will take almost 3 1/2 hours to wipe once and almost 24 hours to wipe to NSA requirements...

    FWIW, if I had to thoroughly wipe a big disc, like 1+ TB in size, I think I'd just get a REALLY big electro-magnet, place it over the drive, and spin up the disc for a few minutes. That would probably randomize the data pretty thoroughly!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,757
    Did you use shred for meet NSA requirement ? or simple dd .
    Following shred command will overwrite file1 content 7 times and at final pass it zeroes out ,to hide shredding.
    shred -zvn 7 file1
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  8. #8
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778
    Quote Originally Posted by Lakshmipathi View Post
    Did you use shred for meet NSA requirement ? or simple dd .
    Following shred command will overwrite file1 content 7 times and at final pass it zeroes out ,to hide shredding.
    Hi Lakshmipathi,

    I never used shred before

    $ which shred
    Code:
    /usr/bin/shred
    It is running on Ubuntu 1004. Can it be used to delete all data on a HD? Thanks

    B.R.
    satimis

  9. #9
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,757

    Exclamation

    yes,shred will work,but it will take long time to complete.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  10. #10
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778
    Quote Originally Posted by Lakshmipathi View Post
    yes,shred will work,but it will take long time to complete.
    Thanks

    B.R.
    satimis

Posting Permissions

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