How to use dd command to erase the data in disk


 
Thread Tools Search this Thread
Operating Systems AIX How to use dd command to erase the data in disk
# 1  
Old 11-25-2010
How to use dd command to erase the data in disk

how to use dd command to erase the data in disk, such as hdisk2?
# 2  
Old 11-25-2010
dd is pretty simple. Be sure to unmount anything on that disk before doing this:

Code:
dd if=/dev/zero of=/path/to/device bs=65536

the bs=65536 is optional, just makes it a bit more efficient by writing more at once.

dd will also work on partitions.

What to do with the disk after is less simple, since the filesystem and even the boot sector therein will be annihilated along with the files.

If you want a less drastic solution than dd-ing and reformatting, you could take a look at the shred command.
# 3  
Old 11-26-2010
Just to expand on what Corona688 has already said: i once read that some (military) paranoids don't stop here but erase disks several times (IIRC 7 times) with different hex values to make sure the overwritten bits can't be restored by some obscure means. If you want to do this prepare a stream with "0xFF"s quite like the "0x00"s from "/dev/zero" and use these two streams alternatingly to write the disk several times.

How often you do that is determined by your own level of paranoia. ;-))

I hope this helps.

bakunin
# 4  
Old 11-26-2010
That's not paranoid at all. We have a policy that all retired media, working or not has to be shredded. We store them up and on request a specialist company turn up with a van and shredder. The maximum permitted size of the pieces is half a centimetre square. Each item has it's serial number confirmed before destruction.

It you are going to reuse the disk elsewhere, just a simple delete will be fine if you trust yourself not to go fishing in future. Plug it in to the next server and format it ready for use. Adding it into a volume group, raid set or whatever will splat over the VTOC information anyway and then each filesystem you build will create new superblocks anyway.


If you want the info on the shredder company let me know.



Robin
# 5  
Old 11-26-2010
Shredding perfectly good disks is a waste of hardware and probably a warranty violation. Smilie I vaguely remember a warranty disagreement between Dell and the US military... They could hardly return the machines intact after they'd used them. They came to a rather Pyrrhic compromise: Dell got the drives back, but didn't get their platters!

It of course depends on your security standards but a simple dd if=/dev/zero of=/dev/disk will wreck the data badly enough that you'd need to hire cleanroom spacesuit people and their special machine to have any hope of retrieving it. With 7 overwrites, not even that.

The shred utility I mentioned earlier does that kind of destructive overwrite at the file level, on filesystems that support it, letting you securely delete a file without needing to reformat. Of course that's no guarantee there's nothing unwanted in unlinked sectors somewhere.

Last edited by Corona688; 11-27-2010 at 03:09 AM.. Reason: /dev/zero, not /dev/null
# 6  
Old 11-26-2010
According to the 2006 NIST Guidelines for Media Sanitization, only one wipe of a disk using dd or dcfldd is necessary. See http://csrc.nist.gov/publications/ni...00-88_rev1.pdf.
# 7  
Old 11-27-2010
hopefully these are local disks(SCSI/SSA). if it is SAN - it is still good to wipe the disks but you cannot truly know where the data is behind the scenes. you can also use the diag erase disk procedure.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. OS X (Apple)

Can I erase and start my mac with unix command

I made a tragic error and erased the extensions manager from my IMac. Now, I can't get the computer to boot up. It just stays on the gray screen. I've tried using the open apple+s method, which brings up the command console (not sure if I've got the lingo down right), and I've tried everything, but... (12 Replies)
Discussion started by: ccff22290
12 Replies

2. UNIX for Advanced & Expert Users

How to erase tape data in unix V4.0 D?

hi! my computer is... System: Digital Personal Workstation 433a Processor: Digital Alpha 21164, 433 MHz Memory: 64 MB OS: Digital Unix Console (SRM), Digital Unix V4.0D how to erase tape data? I tried with mt erase but no success. My tape is 120m. So, how can i erase tape? ... (5 Replies)
Discussion started by: akz
5 Replies

3. AIX

Erase AIX rootvg system disk

Hello all, I need help for erasing IBM P5 machine running AIX 5.3. I have 2 system disks (Hardware mirror) and i'm looking for a way like a LIVE CD bootable CD so I can boot with the cd and then format the system disks with a "secure erase" software. (7 Replies)
Discussion started by: kobi gabai
7 Replies

4. AIX

Erase hard disk

Hi ... How to erase bootable hard disk in Pseries... (3 Replies)
Discussion started by: sumathi.k
3 Replies

5. Filesystems, Disks and Memory

"mt erase" command does not work

Hi I have some data in my tape which I want to erase with the command mt erase The process runs for a long time without cleaning data. What can be the problem?? krishan (2 Replies)
Discussion started by: krishan
2 Replies

6. AIX

Erase hard disk data

How to erase/format hard disk data in RS6000 AIX PowerPC model 43 :confused: ? (8 Replies)
Discussion started by: kenloong
8 Replies

7. SCO

Reading Data from Disk

I have a server with SCO Open Server 5 and I need to copy data files from the hard drive. Can this be completed with a Windows PC with the hard drive connected with a USB caddy? I have no other way to do this. Server not running. TIA Tim (2 Replies)
Discussion started by: taordw
2 Replies

8. UNIX for Dummies Questions & Answers

stty erase e command

I'm not familiar with the stty command. What would "stty erase e" do to my system and what kind of problems would it create? Also, how would I undo this command? (1 Reply)
Discussion started by: CEngel0327
1 Replies

9. UNIX for Dummies Questions & Answers

Is there an unrecoverable erase command?

I am "retiring" an old unix box and need to erase all sensitive data so that it can not be recovered. Does anyone know a unix command for this? (5 Replies)
Discussion started by: snyderpa
5 Replies
Login or Register to Ask a Question

Featured Tech Videos