Page 1 of 1

<SOLVED> Nuke Entire Hard drive?

Posted: Sun Sep 10, 2017 12:55 pm
by DAMIEN1307
hi folks...im about receive about 14 computers via donation to install linux mint onto them and then donate them to deserving school students and seniors in my area...some of these are already linux based but old versions...the people donating them do not know how to securely nuke their hard drives...my question is just for the linux based computers...(the windows and macs i know will have other methods)...is the following terminal command line a total, complete nuke option to use where all will be totally unrecoverable?

sudo dd if=/dev/urandom of=/dev/sda1

this is of course assuming sda1 is the drive...i know there are variations of this of course...any guidance is really appreciated

DAMIEN

Re: Nuke Entire Hard drive?

Posted: Sun Sep 10, 2017 2:16 pm
by richyrich
A comprehensive page (with lots of links of specific directions) for you to get totally confused ! :lol:

https://wiki.archlinux.org/index.php/Securely_wipe_disk

Re: Nuke Entire Hard drive?

Posted: Sun Sep 10, 2017 2:21 pm
by Flemur
DAMIEN1307 wrote:sudo dd if=/dev/urandom of=/dev/sda1
I'd do this:

Code: Select all

sudo dd if=/dev/zero of=/dev/sda
because zero-fill really is good enough and much faster - it won't be readable by anyone; and the full disk will be /dev/sda; a partition is /dev/sda1, etc.
Disclaimer: I've never nuked a full disk, just partitions.

You might try the first one and then make sure you can still put partitions on it afterwards, with gparted.
this is of course assuming sda1 is the drive..
WATCH OUT!
When you're booted into linux the system partition is typically /dev/sda1 - make sure you don't write to that! EDIT: And don't write to /dev/sda!

Also: there might be a "bs=1024" type thing that'd make it run faster, like
"sudo dd if=/dev/zero of=/dev/sda bs=whatever"

Re: Nuke Entire Hard drive?

Posted: Sun Sep 10, 2017 2:47 pm
by DAMIEN1307
hi flemur...so lets see if i got this right...and yes i DO want to use the random rather than the zero even though it takes longer would this now be the correct command?

sudo dd if=/dev/urandom of=/dev/sda1 bs=1024

i did notice that you did not use the numeral "1" after sda...is their a reason why or is the "1" appropriate for the drive in question...i also have some here that are sda2 main drive instead of sda1 mainly because they have a separate boot drive partition formatted in fat32 that is entitled sda1...DAMIEN

Re: Nuke Entire Hard drive?

Posted: Sun Sep 10, 2017 2:58 pm
by kc1di
If you use sda1 then you'll not wipe the whole drive just the partition sda1 if you use sda without the number you'll wipe the whole drive. Depends which you want to do. if say windows boot partition is sda1 that would be the only one wiped. Of course if you have two drives then sda would be the first one sdb the second and so on. other than that the command looks good.

Re: Nuke Entire Hard drive?

Posted: Sun Sep 10, 2017 3:26 pm
by DAMIEN1307
hi kc1di...thank you for the answer of 1 verses no 1...i take it that i can just install linux mint as normal after this proceedure...as a side point i notice your in Maine...my last 20 yrs before moving to Alamogordo NM 6 yrs ago was portsmouth NH..."ahyaaah"...you cant get "thayha" from "heaya"...got to go by "kittry" to get to "banghar...lol...DAMIEN

Re: Nuke Entire Hard drive?

Posted: Sun Sep 10, 2017 3:33 pm
by DAMIEN1307
thanks to all of you that have helped me fine tune this command...by the way...richyrich...love your comment about link to read in order to be totally confused...it goes along well with your avatar pic...lol...DAMIEN

Re: Nuke Entire Hard drive?

Posted: Sun Sep 10, 2017 4:38 pm
by kc1di
Hi DAMIEN1307,
Glad to be of Help and yes I'm and old Mainah. Spent about 3 year in El Paso,Tx and NM Desert back in the 1970's. Returned to maine 30 years ago. The old saying is true "you can take the boy out of Maine but you can't take the Maine out of the boy" :D
I've done what your doing with old machines and give quite a few away. all with Mint or other linux distros on them of course. Good luck and enjoy the process.

Re: Nuke Entire Hard drive?

Posted: Sun Sep 10, 2017 10:38 pm
by jimallyn
DBAN. Darik's Boot And Nuke.

Re: Nuke Entire Hard drive?

Posted: Mon Sep 11, 2017 3:24 pm
by DAMIEN1307
hi jimallyn...i did know about dban but am really comfortable using terminal command lines rather than downloading programs...i have found that the terminal is my friend lol...but many thanks to you as well as all others out here.I find that advice by you as well as kc1di, pjotr, flemur, moem, richyrich, phd1, joseph, clem, majorpooper, catweazel, etc as well as many other names i cant remember right now to have been quite informative and helpful...just try to get this kind of help with windows lol...i especially appreciate the moderators here in the forums that take their time to do this...i suspect that most of you moderators are older retired folks like myself that have found a great niche here not only to keep minds active through computers but also sharing their collective knowledge with others...i do realise that no one has all the answers but collectively all together this just works...thanks to all once again...oh and by the way KC1DI...i really do enjoy the process of converting old computers etc...i now , since oct.2016 have been able to convert 50 computers so far to linux mint of one flavour or another...now for the next 14...lol...keeps me busy and i love it...DAMIEN

Re: Nuke Entire Hard drive?

Posted: Mon Sep 11, 2017 3:30 pm
by Moem
Aww, DAMIEN. What a lovely thing to say. You made me blush! :oops:

Re: Nuke Entire Hard drive?

Posted: Mon Sep 11, 2017 4:05 pm
by richyrich
@DAMIEN1307 , heehee Yellowbeard, one of my favorite comedies of all time . . and what I imagine Richy Rich from those old comics would look like if he lived his life in my shoes . . :lol:

Re: Nuke Entire Hard drive?

Posted: Sun Oct 15, 2017 2:50 am
by Petermint
ATA Secure Erase, https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase, works at the hardware level and wipes everything including unused portions of the disk. It works on most modern disks. If a disk does not have ATA Secure Erase built in, it is probably so old it is about to die.

ATA Secure Erase and some other disk commands fail across USB. Leave the disk in the computer and run the erase from a live boot of Linux.

The next level of security above ATA Secure Erase is to acquire and use the following hardware. This hardware will work no matter what operating system you use. Note that the disk may not format or boot after this procedure. :shock:
https://www.bunnings.com.au/aeg-18v-li- ... y_p6210356
https://www.bunnings.com.au/p-n-10mm-di ... t_p5710034

Re: Nuke Entire Hard drive?

Posted: Sun Oct 15, 2017 9:22 am
by Pierre
since I've recycled lots of PCs over the years,
and never really bothered too much about Nuking / Erasing the HDDs that much.

if it's not going to be an Dual_ boot ( or Tri or Quad ) then I've simply used Gparted on the Live Environment,
- Device - - Create <New> Partition Table - - will erase whatever is on that HDD . . .
then - - New - - create partition(s) as needed for the proposed installation(s).
8)

it will take an IT type to reverse any of that, once it's completed.
:)
ie: there won't be anything or valuable, to recover, from any previous Operating System.

Re: <SOLVED> Nuke Entire Hard drive?

Posted: Sun Oct 22, 2017 8:27 pm
by Lanser
Hi Damien. Fully agree with what the others have suggested, but depending on the size of the drive can take a long time.
Another strategy that I have found to be a bit quicker, is to reformat the whole drive to ext2, then create a formatted veracrypt container to fill the entire partition.
Then delete the whole partition and reformat. To date, using available tools, I have been unable to recover anything on a drive.

cheers Lanser