3

I have an issue with my Buildroot generated Linux and rootfs image for Zynq board. The problem is that random nonblocking pool is generated about 2 minutes after boot, just after I get kernel message like below:

random: nonblocking pool is initialized

It is annoying, because it blocks TCF Agent lanuch, and I have to wait to run anything remotely, or use scp during first 2 minutes.

I'm using Buildroot 2017.08. Is there anything I can do with it?

3

Entropy in VMs and iOT devices might often not be enough.

Install haveged.

From man haveged:

NAME
haveged - Generate random numbers and feed Linux's random device.

DESCRIPTION
haveged generates an unpredictable stream of random numbers harvested from the indirect effects of hardware events on hidden processor state (caches, branch predictors, memory translation tables, etc) using the HAVEGE (HArdware Volatile Entropy Gathering and Expansion) algorithm. The algorithm operates in user space, no special privilege is required for file system access to the output stream.

Linux pools randomness for distribution by the /dev/random and /dev/urandom device interfaces. The standard mechanisms of filling the /dev/random pool may not be sufficient to meet demand on systems with high needs or limited user interaction. In those circumstances, haveged may be run as a privileged daemon to fill the /dev/random pool whenever the supply of random bits in /dev/random falls below the low water mark of the device.

  • Thanks for the response. I just tried and it helps, but it sill gets quite some. The thing is, that I don't really need this good randomness, but I need nonblocking pool to be filled fast. In images generated with Petalinux (it is based on Yocto) message random: nonblocking pool is initialized appears just after first line of Init. If it's not possible to have poll fast initialized with software, is there any way to force it to be initialized, with "weak" randomness? – Staszek Mar 27 '18 at 10:21
  • I would investigate a hw random generator or using the GPU, if any, to get random numbers. – Rui F Ribeiro Mar 27 '18 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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