Operating System - HP-UX
1825768 Members
3287 Online
109687 Solutions
New Discussion

Re: how to sanitize a disk

 
SOLVED
Go to solution
Byron Myers
Trusted Contributor

how to sanitize a disk

D380, direct attached SCSI disk, HP-UX 10.20.
Anyone have a good method to sanitize a disk. I am returning leased disk to HP, and I want to wipe out every bit on the disk before returning. I am looking for something like dd, tr, etc.. A response with a command example would be perfect.
If you can focus your eyes far and straight enough ahead of yourself, you can see the back of your head.
14 REPLIES 14
Pete Randall
Outstanding Contributor

Re: how to sanitize a disk

dd if=/dev/zero of=/dev/rdsk/cXtYdZ bs=1024k


Pete



Pete
Caesar_3
Esteemed Contributor

Re: how to sanitize a disk

Hello!

You can use the "mediainit"
or dd if=/dev/zero of= bs=2048k

It will do the work.

Caesar
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: how to sanitize a disk

10.20 does not have an absolutely reliable /dev/zero; it rurns a few non NUL's but that's actually good for this application:

1) ls -l /dev/zero; if found you are in business but otherwise we need to make one.
mknod /dev/zero c 3 0x03
chmod 444 /dev/zero

NOTE: This is the correct major/minor device tuple for 10.20 but it is incorrect for 11.x.

2) dd if=/dev/zero bs=64k of=/dev/rdsk/c0t5d0



If it ain't broke, I can fix that.
Elena Leontieva
Esteemed Contributor

Re: how to sanitize a disk

dd if=/dev/zero of=/dev/rdsk/device

if /dev/zero does not exist, create it:
mknod /dev/zero c 3 0x00003
Shannon Petry
Honored Contributor

Re: how to sanitize a disk



There is a nice handy search box right on the same screen your reading this from, as well as browsing the forums, submitting a post, looking at maintenance, and more.

I dont mean to sound abrupt, but it's kind of like asking people how to spell a word when you have a dictionary in your hands.

I'd point to links, but if you type 2 words in the search box, you will find more than 2 pages of links. "wipe" and "disk"

I'm sure others will post answers and links for you, but I'd rather teach you how to use the tools we all have available.

Regards,
Shannon
Microsoft. When do you want a virus today?
Martin Johnson
Honored Contributor

Re: how to sanitize a disk

We use a degausser. When there are a lot of disks involved, it is much faster.

HTH
Marty
Geoff Wild
Honored Contributor

Re: how to sanitize a disk

How to use ODE to wipe out a disk
Reboot the machine
Insert the support plus media cd
Stop the "boot primary path"

Then find the cdrom drive:

>search

>boot

At the ISL prompt:

ISL>ode

At the ODE prompt:

ODE>diskexpt

You will be prompted for a password, get one from HP:


Commands to use in DISKEXPT:

To see disks: dispmap
Select disk: testdisk #
Then enter:

wrtmt

For range, enter 0/ and the max number displayed
Select 3 for userdefined, then enter 0 to write all zero's

Wait.....a long time............

Do this for all disks.....


Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Byron Myers
Trusted Contributor

Re: how to sanitize a disk

Shannon, your comments are appreciated but I suggest you work on your bedside manners. I actually searched the forum with "+sanitize +disk", as well as "+sanitize". I didn't find any good hits. I went back and did a search with "+wipe +disk", as Shannon suggested, and saw many good hits.
If you can focus your eyes far and straight enough ahead of yourself, you can see the back of your head.
James R. Ferguson
Acclaimed Contributor

Re: how to sanitize a disk

Hi Bryon:

With deference to Shannon, the ITRC search engine has always suffered problems. At times, it's an insult to good search engines to call it by that name. There are numerous instances where no results will be found; and times when there are a high proportion of hits which are totally devoid of *any* keyword specified. I'd be rich if I had a nickel for everytime I have pointed this out to Dan and his predecessors.

Regards!

...JRF...
Shannon Petry
Honored Contributor

Re: how to sanitize a disk

Well, I think my bedside manner is fine, or I would not have said "I dont mean to sound abrupt" :)

It's surprising the percentage of people who do not search the forums, be it from lack of knowing how, or not realizing that the search is not for drivers, software, hardware, etc... but actually searches the forums for questions.

I'd say the percentage of repeat questions is almost 99% on most things you can think of.

I'm not here to always push people's happy buttons. In my mind it's much better to teach and make you think. Sometimes that means thinking from an angle that I guess you have not approached.

If I can teach you a bit, and make you think from different angles, then your more apt to grok the answer yourself the next time, and hopefully teach someone else down the road.

Sincerely,
Shannon
Microsoft. When do you want a virus today?
Brian Markus
Valued Contributor

Re: how to sanitize a disk

If you want to be 100% sure that none of the data is recoverable, you should wipe this disk several times overwriting all blocks with 111's then 000's or some combo like that. There are many freeware as well as commercial applications available out on the net such as Drivescrubber and others that the DOD use for drives they "really" don't want to be read. :)

Do a search on www.google.com for "military wipe data" and you'll find a ton of applications that should do the trick. 7 - 30 wipes should be good depending on how critical the data was. Check sourceforge.net for a wiping program like WIPE http://wipe.sourceforge.net/ , might do what your looking for. Also freeware versions of PGP, or GPG might do it. (can???t recall if they do file systems or just files) Regardless of which way you go, it depends on how critical the data was, a simple dd can be recovered with talent, professional tools, enough time and money. If you wipe it enough times, nothing will ever show up.

Hope this helps

-Brian.


When a sys-admin say's maybe, they don't mean 'yes'!
Byron Myers
Trusted Contributor

Re: how to sanitize a disk

Brian, How can data be recoverd from a "dd" wipe if I "dd" every block on a disk as suggested by the replies above?
If you can focus your eyes far and straight enough ahead of yourself, you can see the back of your head.
James R. Ferguson
Acclaimed Contributor

Re: how to sanitize a disk

Hi Bryon:

You asked, "How can data be recoverd from a "dd" wipe if I "dd" every block on a disk as suggested by the replies above?". The paper titled, "Secure Deletion of Data from Magnetic and Solid-State Memory" by Peter Gutmann (available at the link offered by Brian, above), notes:

/begin_quote/

...truly deleting data from magnetic media is very difficult. The problem lies in the fact that when data is written to the medium, the write head sets the polarity of most, but not all, of the magnetic domains. This is partially due to the inability of the writing device to write in exactly the same location each time, and partially due to the variations in media sensitivity and field strength over time and among devices.

In conventional terms, when a one is written to disk the media records a one, and when a zero is written the media records a zero. However the actual effect is closer to obtaining a 0.95 when a zero is overwritten with a one, and a 1.05 when a one is overwritten with a one. Normal disk circuitry is set up so that both these values are read as ones, but using specialised circuitry it is possible to work out what previous "layers" contained. The recovery of at least one or two layers of overwritten data isn't too hard to perform...

/end_quote/

A full copy of the publication can be found here:

http://wipe.sourceforge.net/secure_del.html

This should begin to answer your question.

Regards!

...JRF...
Byron Myers
Trusted Contributor

Re: how to sanitize a disk

Thanks James, This forum is certainly in a class above the rest. I can always count you you guys and gals posting excellent responses.
BTW, I am running the "dd" commands suggested -I will run about 5 iterations, given this new information (to me) about the characteristics of rewritten bits on magnetic disk.
If you can focus your eyes far and straight enough ahead of yourself, you can see the back of your head.