<SOLVED> Nuke Entire Hard drive?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
DAMIEN1307
Level 3
Level 3
Posts: 186
Joined: Tue Feb 21, 2017 8:13 pm

<SOLVED> Nuke Entire Hard drive?

Postby DAMIEN1307 » Sun Sep 10, 2017 12:55 pm

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
Last edited by DAMIEN1307 on Tue Oct 17, 2017 11:33 am, edited 1 time in total.

User avatar
richyrich
Level 18
Level 18
Posts: 8677
Joined: Mon May 04, 2009 8:31 pm

Re: Nuke Entire Hard drive?

Postby richyrich » Sun Sep 10, 2017 2:16 pm

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

User avatar
Flemur
Level 13
Level 13
Posts: 4543
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Nuke Entire Hard drive?

Postby Flemur » Sun Sep 10, 2017 2:21 pm

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"
Mint 18.2 Xfce/fluxbox/pulse-less - Xubuntu 16.10/fluxbox/pulse-less
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?

DAMIEN1307
Level 3
Level 3
Posts: 186
Joined: Tue Feb 21, 2017 8:13 pm

Re: Nuke Entire Hard drive?

Postby DAMIEN1307 » Sun Sep 10, 2017 2:47 pm

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

User avatar
kc1di
Level 10
Level 10
Posts: 3308
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Nuke Entire Hard drive?

Postby kc1di » Sun Sep 10, 2017 2:58 pm

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.
John 3:16
Morse code an Early Digital Mode
Registered Linux User #462608
Wireless Script: http://ubuntuforums.org/showthread.php?t=2082305&p=12350385#post12350385
Good terminal command tutorial: https://ryanstutorials.net/linuxtutorial/

DAMIEN1307
Level 3
Level 3
Posts: 186
Joined: Tue Feb 21, 2017 8:13 pm

Re: Nuke Entire Hard drive?

Postby DAMIEN1307 » Sun Sep 10, 2017 3:26 pm

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

DAMIEN1307
Level 3
Level 3
Posts: 186
Joined: Tue Feb 21, 2017 8:13 pm

Re: Nuke Entire Hard drive?

Postby DAMIEN1307 » Sun Sep 10, 2017 3:33 pm

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

User avatar
kc1di
Level 10
Level 10
Posts: 3308
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Nuke Entire Hard drive?

Postby kc1di » Sun Sep 10, 2017 4:38 pm

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.
John 3:16
Morse code an Early Digital Mode
Registered Linux User #462608
Wireless Script: http://ubuntuforums.org/showthread.php?t=2082305&p=12350385#post12350385
Good terminal command tutorial: https://ryanstutorials.net/linuxtutorial/

User avatar
jimallyn
Level 16
Level 16
Posts: 6687
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Nuke Entire Hard drive?

Postby jimallyn » Sun Sep 10, 2017 10:38 pm

DBAN. Darik's Boot And Nuke.
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

DAMIEN1307
Level 3
Level 3
Posts: 186
Joined: Tue Feb 21, 2017 8:13 pm

Re: Nuke Entire Hard drive?

Postby DAMIEN1307 » Mon Sep 11, 2017 3:24 pm

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

User avatar
Moem
Level 11
Level 11
Posts: 3683
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Nuke Entire Hard drive?

Postby Moem » Mon Sep 11, 2017 3:30 pm

Aww, DAMIEN. What a lovely thing to say. You made me blush! :oops:
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

User avatar
richyrich
Level 18
Level 18
Posts: 8677
Joined: Mon May 04, 2009 8:31 pm

Re: Nuke Entire Hard drive?

Postby richyrich » Mon Sep 11, 2017 4:05 pm

@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:

Petermint
Level 4
Level 4
Posts: 283
Joined: Tue Feb 16, 2016 3:12 am

Re: Nuke Entire Hard drive?

Postby Petermint » Sun Oct 15, 2017 2:50 am

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-ion-cordless-hammer-drill-skin-only_p6210356
https://www.bunnings.com.au/p-n-10mm-diamond-core-drill-bit_p5710034

User avatar
Pierre
Level 15
Level 15
Posts: 5853
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Nuke Entire Hard drive?

Postby Pierre » Sun Oct 15, 2017 9:22 am

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.
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

User avatar
Lanser
Level 4
Level 4
Posts: 254
Joined: Mon Mar 08, 2010 5:12 am
Location: Perth AU or Salzburg AT

Re: <SOLVED> Nuke Entire Hard drive?

Postby Lanser » Sun Oct 22, 2017 8:27 pm

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
Please Don't Charge the Particles. It Only Gets Them Excited.


Return to “Other topics”

Who is online

Users browsing this forum: No registered users and 5 guests