Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

in gpg --key-gen

following error occured.

Not enough random bytes available. 
Please do some other work to give the OS a chance to collect more 
entropy!
(Need 300 more bytes)

What's wrong?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

/dev/random's entropy pool is depleted.

"do something" to generate disk activity, network traffic, etc... and the entropy will build.

"man random" for more info.

"cat /proc/sys/kernel/random/entropy_avail" to see how you're doing, then try the gpg process again.

share|improve this answer
    
As an example of what to do I started with 257 in entropy_avail I then did touch blah rm blah about 10 times now I have entropy_avail, so most any disk access should do. –  Unkwntech Aug 6 '09 at 3:06
    
In case someone else encounters it: starting programs (ASLR? No idea) seems to consume some entropy (about 100). To watch the entropy pool, write a C program that reads the contents of the file and periodically writes it back (don't forget to lseek(fd, 0, SEEK_SET). –  Lekensteyn Jan 28 '13 at 23:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.