[Christian Kastner]
> I have an upload planned with a change to test my hypothesis.
Note, Debian Edu used the following hack for some years when running low
on entropy during installation. It was removed when switching to using
the haveged udeb as it became available:
# Try to add entropy when running low
# FIXME this feature can be removed when haveged is part of Debian
# Installer, see #923675
(
cd /
while true ; do
entropy="$(cat /proc/sys/kernel/random/entropy_avail)"
if [ 130 -gt "$entropy" ] ; then
log "low on entropy, pool is $entropy. trying to add more"
# Disk IO add entropy to the kernel. Flush cache to ensure
# find and touch/rm causes disk IO.
sync
echo 3 > /proc/sys/vm/drop_caches
find /target > /dev/null || true
touch /target/var/tmp/foo
sync
rm /target/var/tmp/foo
sync
entropy="$(cat /proc/sys/kernel/random/entropy_avail)"
log "entropy pool is $entropy after trying to add"
fi
sleep 20
done
) < /dev/null 2>&1 3>/dev/null 4>&3 5>&3 6>&3 | logger -t edu-entropy-add &
epid=$!
...
# Ignore errors in case the entropy gathering is no longer running
if kill $epid ; then
:
else
log "error: killing the entropy gathering job failed - exited?"
fi
Perhaps it can provide some ideas on how to get around lack of entropy
in the kernel. Note, this process was running as root.
--
Happy hacking
Petter Reinholdtsen