You are not logged in.

#1 2012-02-12 14:15:31

trishtren18
Member
From: Iowa, America
Registered: 2009-11-12
Posts: 45

Cannot generate key after fresh install[Solved]

Hey all,
  I joined the darkside for a while to be able to play starwars the old republic but decided to come home where its warm and safe.  So I do a fresh install of arch.  After the install and initial update(of pacman) im told to run pacman-key --init.  I did and it throws the infamous "not enough random bytes".  I follwed the suggestions of a few forum posts on here to generate some entrophy including doing the cat /dev/urandom bit and inputing a ton of random characters but it's a no go.  After doing all of that it comes back with I need 44 more bytes so I do a bunch of stuff again but it seems to reset and say I need 283 bytes now.  I'm at my wits end and reaching out to the community.  If anyone knows of anything I can do from a fresh install to get this key to gen please let me know and thank you in advance.

-Randy

Last edited by trishtren18 (2012-02-12 21:41:02)

Offline

#2 2012-02-12 14:24:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,464
Website

Re: Cannot generate key after fresh install[Solved]

I'm not sure you should retry the init, you certainly don't have to.  Just run the command, and when it says it needs more bytes leave it be while you do other work.  When it collects enough entropy it will continue on it's own.

While this part is way out of my depth, cat'ing /dev/urandom would not seem to be a good idea.  That *uses* random bytes, it doesn't create them.  If one could read from the random number pool then reuse what was read to initialize a cryptographic process, it seems to me that this would be a horrible hole in the security.  Further, your results suggest that this cat'ing may be depleting the random number pool since the required number of bytes *increased*.

Last edited by Trilby (2012-02-12 14:25:30)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2012-02-12 15:01:24

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Cannot generate key after fresh install[Solved]

Try moving your mouse around or run 'updatedb'.
https://wiki.archlinux.org/index.php/Pa … entropy.3F

Offline

#4 2012-02-12 15:23:19

trishtren18
Member
From: Iowa, America
Registered: 2009-11-12
Posts: 45

Re: Cannot generate key after fresh install[Solved]

@Karol I haven't installed synaptics or configured my x server yet, but I can try the updatedb for sure.

@Trilby so whether I do the key gen immediately after the update to pacman or after I fully set up my box is irrelevant? Just asking cuz if so onward I move.

Offline

#5 2012-02-12 16:54:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,464
Website

Re: Cannot generate key after fresh install[Solved]

It certainly doesn't need to be immediately after - but you will not be able to use package signing until it is generated.  My point was more that you shouldn't stop the process then retry it later, though I was also under the mistaken impression that you had X already.  I'd suggest running the key init in one tty, then when it gives you that message, just leave it be (don't stop/quit the process), switch to another tty and go about other business.  You can cat some files to /dev/null, or do deliberate generation of random bits - but just editing a few config files (which you may be doing anyways) should do just fine.

Alternately you could disable signing (in pacman.conf) for the time being to get everything up and running first - but generating entropy shouldn't take more than a few minutes of normal tinkering - if the pacman-key --init is still running in another tty.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2012-02-12 21:41:59

trishtren18
Member
From: Iowa, America
Registered: 2009-11-12
Posts: 45

Re: Cannot generate key after fresh install[Solved]

@tilby thanks for the advice.  Ran the keygen in one tty and continued on with the install in another and problem resolved itself.  Thanks, issue solved.

Last edited by trishtren18 (2012-02-12 21:42:16)

Offline

Board footer

Powered by FluxBB