1821639 Members
3306 Online
109633 Solutions
New Discussion юеВ

No /dev/urandom

 
SOLVED
Go to solution
TYP3R
Frequent Advisor

No /dev/urandom

HI Guru's

I'm, having trouble with the following:

#/dev/urandom of=/dev/rdsk/c#t#d# bs=512k conv=noerror

I get /dev/urandom: No such file or directory

Do i need to create a directory with the /dev/urandom file init ? With the same principles with the /dev/zero ? eg:

#mknod /dev/urandom c 3 0x00003
#chmod 444 /dev/urandom

If soo how can this actually write in random instead of the begining to end of disk ?

Thanks for the help

Will
11 REPLIES 11
Luk Vandenbussche
Honored Contributor

Re: No /dev/urandom

Will,

I don't know what you are trying to do, but
/dev/urandon cann't be used as a command.

Possible there is a mistake in the output of your command?
TYP3R
Frequent Advisor

Re: No /dev/urandom

Hi Luk

I got this from this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=972440

I know that i can use this command:

dd if=/dev/zero of=/dev/rdsk/c#t#d# bs=512k

But i assume that the /dev/urandom will write 0's all over the disk randomly ( Like a butterfly effect) than from beging to end, But i get an I/O error with the /dev/zero comamnd, Is there a way to get rid of the error as oseek=1 or conv=noerror doesnt work

Will
Steven E. Protter
Exalted Contributor
Solution

Re: No /dev/urandom

Shalom,

With HP-UX 11.11, you may need to install the strong randome number generator to accomplish this task.

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=KRNG11I
Reboot required


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: No /dev/urandom

>Luk: /dev/urandon can't be used as a command.

I believe it was:
# dd if=/dev/urandom of=/dev/rdsk/c#t#d# bs=512k conv=noerror
TYP3R
Frequent Advisor

Re: No /dev/urandom

HI SEP

Thanks for the link but after i've read it, Its not what i really want, All i want is to write zero randomly across the disk ( Butterfly Effect) with the command:

dd if=/dev/zero of=/dev/rdsk/c#t#d# bs=512k

Instead of writing zero from start-end of the disk.

Is this possible at all ? or am i been to picky on the way it writes zero on the disk ?

Will
Dennis Handly
Acclaimed Contributor

Re: No /dev/urandom

>All i want is to write zero randomly across the disk (Butterfly Effect)

Do you want to shake the disk apart?
Can you say why you want to do this?

>Is this possible at all?

Only if your write your own application.
TYP3R
Frequent Advisor

Re: No /dev/urandom

Dennis

It just that a customer want us to write zeros to a disk in that way

Will

Dennis Handly
Acclaimed Contributor

Re: No /dev/urandom

>It just that a customer want us to write zeros to a disk in that way

Is he trying to destroy the data on the disks?
TYP3R
Frequent Advisor

Re: No /dev/urandom

Well Dennis if you read what i want to do,

Writing zeros do destroy the data on the disk.

If you not going to help me out then stop moaning what other people saying as they are trying to help me out unlike you.
Hein van den Heuvel
Honored Contributor

Re: No /dev/urandom

Interesting...

>> Well Dennis if you read what i want to do,

Dennis read what you want to do, but is one step ahead of you, which you fail to see/accept.
He, like most of the folks here reading your question, realizes that you are on a wrong tangent and wants to help you with the true problem behind the question.

>> Writing zeros do destroy the data on the disk.

Then you should just use /dev/zero and let'r rip. By writting chunks of zeroes at random place you may will destroy some data, but not all. That will make it harder to figure out what was on the disk, bight might not make it impossible.

There are many, many prior topics on 'destroying' data on a disk. Just google.

>> If you not going to help me out then stop moaning what other people saying as they are trying to help me out unlike you.

He is trying to help better than the others by addressing the real problem vs the perceived problem.

>> All I want is to write zero randomly across the disk

Then you would need to randomly change the optional 'oseek' argument value for the dd command to create an 'Output Seek'.

The 'if' argument is the Input File and by providing /dev/zero this will give an infinited stream of buffers of zeroes, where a /dev/random would provide a stream of buffers of random data... but the dd command will just write those out one after the other, not in a random place. You'd be getting random data in a predictable place.

Cheers,
Hein.



OldSchool
Honored Contributor

Re: No /dev/urandom

"But i assume that the /dev/urandom will write 0's all over the disk randomly ( Like a butterfly effect) than from beging to end..."

nope. its going to write a random number from beginning to end, not 0's randomly across the disk.

as noted in the other thread you noted, pvcreate + multiple passes are a viable alternative.