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 ...
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,546

    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,568
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  3. #3
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,546
    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, or in a galaxy far, far away.
    Posts
    8,961
    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,568
    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
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,961
    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,568
    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
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  8. #8
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,546
    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,568

    Exclamation

    yes,shred will work,but it will take long time to complete.
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  10. #10
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,546
    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
  •