<SOLVED> Nuke Entire Hard drive?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
<SOLVED> Nuke Entire Hard drive?
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
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 LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Nuke Entire Hard drive?
A comprehensive page (with lots of links of specific directions) for you to get totally confused !
https://wiki.archlinux.org/index.php/Securely_wipe_disk
https://wiki.archlinux.org/index.php/Securely_wipe_disk
Re: Nuke Entire Hard drive?
I'd do this:DAMIEN1307 wrote:sudo dd if=/dev/urandom of=/dev/sda1
Code: Select all
sudo dd if=/dev/zero of=/dev/sda
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.
WATCH OUT!this is of course assuming sda1 is the drive..
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"
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: Nuke Entire Hard drive?
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
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?
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.
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Re: Nuke Entire Hard drive?
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?
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?
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"
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.
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"
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.
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Re: Nuke Entire Hard drive?
DBAN. Darik's Boot And Nuke.
“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
Re: Nuke Entire Hard drive?
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?
Aww, DAMIEN. What a lovely thing to say. You made me blush!
If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Re: Nuke Entire Hard drive?
@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 . .
Re: Nuke Entire Hard drive?
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.
https://www.bunnings.com.au/aeg-18v-li- ... y_p6210356
https://www.bunnings.com.au/p-n-10mm-di ... t_p5710034
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.
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?
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).
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.
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).
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.
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!.
Re: <SOLVED> Nuke Entire Hard drive?
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
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