-
Command Line to wipe a hard drive
Is there a nice list of command lines somewhere. New at this and the command lines I've attempted are not getting me anywhere. Need to wipe a hard drive.
Thanks in advance.
-
![Quote](images/misc/quote_icon.png)
Originally Posted by
Seabean1
Need to wipe a hard drive.
Hi Seabean1 and welcome to the Knoppix forums.
No reply ? Perhaps what you are asking is not what you need. I think most reading your post will say to themselves "Anyone who knows what they are doing would not have to ask how to do something so dangerous". There certainly isn't a nice command line that is guaranteed not to wipe the wrong hard drive for you.
Could you tell a little of what you are trying to achieve or what has gone wrong for you ?
Usually it is enough to repartition your disk and create new file systems. Wiping the hard drive is something you'd only need to do you've confidential data or naughty pictures on the drive you really need to destroy. There's special disk wiping software available for that.
You sure it's a hard drive 'cos flash drives are different. You sure it the whole drive and not just a partition ?
-
Yes....I need to wipe the whole drive!
Thank-you for your response. I work in a data center and I've been asked to wipe all hard drives before decommissioning a server. Normally, we have a service punch a hole in the drive, but this one device is being shipped out for reuse at another center. Thanks.
-
Senior Member
registered user
if you are REALLY certain you want data to be written over the entire disk I can give commands here that will do it fairly well.
first I would like you to disconnect everything but that one drive and what you have Knoppix runing on, then write back here, yes I am serious
one of the commands is called dd and this command will do a great job of overwriting the information on ANY disk.
my command is actually several commands in sequence that will take a while to complete (we talk days with any large drive).
fact is that some of it may actually still be recovered with some care after 10 repeats, clasified data on things like hospital computers require this to be repeated 25 times and to be treated as still not 100% clean.
some authorities (read armed forces, intelligence community...) require disks with sensitive data to be incinerated at 1300°C, by then the disk is a molten blob of metal waaaay beyond curie point.
Curie point is the point where materials loose their magnetic properties and the domains are in free flux, even a bar of steel is not magnetic at that point (blacksmiths use that fact when they harden carbon or "low alloy" steel, at that point the steel is just few degrees below ideal hardening temperature)
-
I am using an old server and I'm booting from the CD with Knoppix. I have a total of 4 drives to wipe, but can do one at a time if necessary. Time is not an issue. And thanks.
-
Senior Member
registered user
ok, here goes, if you type wrong drive number you will wipe wrong drive beyond easy repair, so take care.
first you become "superuser" or more correctly root.
everything you do from now is dangerous.
first you find name of drive by typing on a commandline.
the outout wil be something like
Disk /dev/sdb: 7948 MB, 7948206080 byte
Enhet start end Block Id System
/dev/sda1 * 11 19166 7757824 83 Linux
(yeah I am using a pen-drive just now)
this tell me that I have only one drive called sda and only one partition called 1
a ATA drive would show up as hda for first drive, hdb for second, hdc for third...
a SCSI or SATA drive would show up as sda for first drive, sdb for second, sdc for third...
partitions are merely numbers 1, 2, 3...
wiping the disk I write
Code:
dd if=/dev/urandom of=/dev/sda&&dd if=/dev/zero of=/dev/sda
this wil first write "random" data to the entire drive bit by bit, in the process wrecking any partitiontable, filesystem... then it will write zero's to entire drive bit by bit (yeah, will take a while).
if you just wanted data to be fairly well destroyed so you could start anew, here you go.
if not enough, now for second step.
make disk one large partition and encrypt entire drive, that is a bit more than I can write here, but here you have one link (search web for more, there is a lot out there).
http://www.tldp.org/HOWTO/html_singl...ryption-HOWTO/
Actually you could likely do it using RSA/SHA like if it was a textfile or E-mail.
use sha or rsa on /dev/XYZ as if it was a file
if you want a "deeper wipe" repeat ALL steps above 25 times/disk
if you want data 100% gone you are out of luck as to simpel computer code, according to authorities only way to be 100% certain is if you melt them down and almost have to stir the thing according to some (not likely needed imho as the magnetic properties will be gone past curie point)
Last edited by OErjan; 03-12-2011 at 07:58 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
![DELL PowerEdge R730 Server 2x E5-2680v4 2.4GHz =28 Cores 32GB H730 4xRJ45 picture](/store/img/g/O2MAAOSwRtNkh97Y/s-l225/DELL-PowerEdge-R730-Server-2x-E5-2680v4-2-4GHz-28-.jpg)
DELL PowerEdge R730 Server 2x E5-2680v4 2.4GHz =28 Cores 32GB H730 4xRJ45
$284.00
![Dell PowerEdge R620 Server 2x E5-2660 v1 2.2GHz 16 Cores 256GB RAM 2x 300GB HDD picture](/store/img/g/Fk4AAOSwDDplpAyL/s-l225/Dell-PowerEdge-R620-Server-2x-E5-2660-v1-2-2GHz-16.jpg)
Dell PowerEdge R620 Server 2x E5-2660 v1 2.2GHz 16 Cores 256GB RAM 2x 300GB HDD
$89.99
![Dell R630 Server 2x E5-2620 V4 2.1GHz =16 Cores 128GB DDR4 1x 960GB 2x 1G 2x 10G picture](/store/img/g/gnIAAOSwoF1l5p3L/s-l225/Dell-R630-Server-2x-E5-2620-V4-2-1GHz-16-Cores-128.jpg)
Dell R630 Server 2x E5-2620 V4 2.1GHz =16 Cores 128GB DDR4 1x 960GB 2x 1G 2x 10G
$210.00
![Dell PowerEdge R530 Server 2x E5-2620 V4 = 16 Cores | H730 | 32GB RAM | 2x trays picture](/store/img/g/x5IAAOSwMgJmOSN6/s-l225/Dell-PowerEdge-R530-Server-2x-E5-2620-V4-16-Cores-.jpg)
Dell PowerEdge R530 Server 2x E5-2620 V4 = 16 Cores | H730 | 32GB RAM | 2x trays
$279.99
![Dell PowerEdge R720 Server - 2x8c CPUs, 256Gb RAM, 128Gb SSD/3x900Gb SAS Proxmox picture](/store/img/g/~QQAAOSwSL9mJ7It/s-l225/Dell-PowerEdge-R720-Server-2x8c-CPUs-256Gb-RAM-128.jpg)
Dell PowerEdge R720 Server - 2x8c CPUs, 256Gb RAM, 128Gb SSD/3x900Gb SAS Proxmox
$340.00
![Dell PowerEdge R620 Server - 128GB RAM, 2x8c CPU, 128Gb SSD/3x900Gb SAS, Proxmox picture](/store/img/g/480AAOSw9TVl9vAv/s-l225/Dell-PowerEdge-R620-Server-128GB-RAM-2x8c-CPU-128G.jpg)
Dell PowerEdge R620 Server - 128GB RAM, 2x8c CPU, 128Gb SSD/3x900Gb SAS, Proxmox
$260.00
![Dell PowerEdge R730 Server 2x E5-2690 V3 = 24 Cores 128GB DDR4 H730 8x 600GB HDD picture](/store/img/g/iK8AAOSwzJRl6i5o/s-l225/Dell-PowerEdge-R730-Server-2x-E5-2690-V3-24-Cores-.jpg)
Dell PowerEdge R730 Server 2x E5-2690 V3 = 24 Cores 128GB DDR4 H730 8x 600GB HDD
$368.00
![Dell POWEREDGE R530 Server 2 X 8-core E5-2630v3 32gb RAM PERC H730 2TB HDD picture](/store/img/g/qAwAAOSwC29mQTPn/s-l225/Dell-POWEREDGE-R530-Server-2-X-8-core-E5-2630v3-32.jpg)
Dell POWEREDGE R530 Server 2 X 8-core E5-2630v3 32gb RAM PERC H730 2TB HDD
$275.00
![DELL PowerEdge R630 8SFF Server 2x E5-2680v4 2.4GHz =28 Cores 32GB H730 4xRJ45 picture](/store/img/g/qfQAAOSw9XRklkNR/s-l225/DELL-PowerEdge-R630-8SFF-Server-2x-E5-2680v4-2-4GH.jpg)
DELL PowerEdge R630 8SFF Server 2x E5-2680v4 2.4GHz =28 Cores 32GB H730 4xRJ45
$264.00
![DELL PowerEdge R630 8SFF Server 2x E5-2699v3 2.3GHz =36 Cores 64GB H730 4xRJ45 picture](/store/img/g/qfQAAOSw9XRklkNR/s-l225/DELL-PowerEdge-R630-8SFF-Server-2x-E5-2699v3-2-3GH.jpg)
DELL PowerEdge R630 8SFF Server 2x E5-2699v3 2.3GHz =36 Cores 64GB H730 4xRJ45
$350.00