Friday, November 4, 2011

pacman-key --init not enough random bytes available

Running pacman-key I get



[youri@slavluv ~]$ sudo pacman-key --init
gpg: Generating pacman keychain master key...


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


a.)[youri@slavluv aur]$ wget http://aur.archlinux.org/packages/rn/rng-tools/rng-tools.tar.gz
b.)[youri@slavluv aur]$ tar zxvf rng-tools.tar.gz
c.)[youri@slavluv aur]$ cd rng-tools
d.)[youri@slavluv rng-tools]$ makepkg -s
e.)[youri@slavluv rng-tools]$ sudo pacman -U rng-tools-3-2-i686.pkg.tar.xz
f.) change timeout=0 to timeout=10 in /etc/conf.d/rngd

2.) [youri@slavluv rng-tools]$ sudo rngd -f -r /dev/urandom

3.) [youri@slavluv ~]$ sudo pacman-key --init
Password:
gpg: Generating pacman keychain master key...
....+++++
................+++++
gpg: key DBCCC88E marked as ultimately trusted
gpg: Done
==> Updating trust database...
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u



5 comments:

  1. Thanks! I did this on my headless ARM box (had to add 'arm' to PKGBUILD and the name of the created package file was changed a little, otherwise it went just perfect!)
    Thanks!

    ReplyDelete
  2. Thanks a lot, it was a life savier

    ReplyDelete
  3. Thanks a lot, I learned how to use makepkg too in a matter of seconds. Sometimes the solution makes you wonder about how we got here in the first place :)

    Anyway, on new systems it would be
    sudo pacman -U rng-tools-3-2-x86_64.pkg.tar.xz
    instead of
    sudo pacman -U rng-tools-3-2-i686.pkg.tar.xz

    ReplyDelete
  4. I'm not sure what's different on my system and why the original rngd -f -r /dev/urandom from this thread didn't work for me, but what DID work was this: rngd -b -r /dev/urandom
    The -b runs it as a background daemon process which allowed it to complete and open the prompt back up for me to run pacman-key --init

    ReplyDelete
  5. ran into this:

    ==> ERROR: Cannot find the strip binary required for object file stripping.

    on Arch 3.2.9-1

    ReplyDelete