Comment 5 for bug 1622893

Revision history for this message
Martin Pitt (pitti) wrote : Re: NetworkManager takes very log to start, or times out, blocked on RNG

I tried various workarounds for autopkgtest testbeds -- we *really* don't care for good random numbers there, and this causes awful delays in various tests.

https://github.com/openstack-infra/project-config/blob/master/nodepool/elements/initialize-urandom/static/usr/local/bin/initialize-urandom.py has a very good explanation of how the urandom pool is initialized. Based on that, this unit drop-in speeds up urandom initialization by fake entropy:

# /etc/systemd/system/systemd-random-seed.service.d/fakeentropy.conf
[Service]
ExecStart=/usr/bin/perl -E 'open $$f, "/bin/bash" or die; open $$rnd, ">/dev/random" or die; for ($$i = 0; $$i < 10; ++$$i) {read $$f, $$d, 64; ioctl $$rnd, 0x40085203, pack("ii", 64*8, 64) . $$d}'