Problems with entropy and FAI kernel 2.6.16

David Riddle driddle at
Tue May 9 04:26:47 CEST 2006


I am using FAI 2.10.1 and the 2.6.16 FAI kernel. I am trying to run a
script that executes the following command during an FAI install:

$ROOTCMD kdb5_util create -s -P $PASSWD

The script is a hook and it is called configure.KERBEROS. Now when I
use the 2.6.16 kernel the command freezes. When I use the 2.4.27
kernel it works fine. I looked into it and the problem is a lack of
entropy. I have my scripts run this command right before the above
command is executed:

cat /proc/sys/kernel/random/entropy_avail

which generally gives a result of around 300. According the the
/dev/random manpage entropy_avail should be equal to 4096. Now I can
raise the entropy manually be typing at my keyboard or by copying
files, etc. which does fix the problem. So a workaround would be to do
something like this:

cp -r /tmp/target/usr /tmp/target/tmp/
rm -r /tmp/target/tmp/usr/

which raised the entropy from 159 to 2360 in one test. At first I
thought that possibly the kernel was not using the hard drive as an
entropy source but it clearly is. Now by the time configure.KERBEROS
is executed the disk should have seen lots of activity and entropy
should be good but it is not. I preformed some tests to figure out
what is going on.

1. First I wait until the install gets to configure.KERBEROS then I press ctrl+c

2. Run "cat /proc/sys/kernel/random/entropy_avail" which says that
entropy is at 176.

3. Run "cp -r /tmp/target/usr /tmp/target/tmp/" then "rm -r

4. Run "cat /proc/sys/kernel/random/entropy_avail" again which gives 1042.

5. Wait about ten minutes and type "cat
/proc/sys/kernel/random/entropy_avail" which gives an entropy of 175.

Now doing the same steps on the 2.4.27 kernel the entropy ends up at
3688. So the question is why is the entropy being depleted so quickly
with the 2.6.16 kernel?

David Riddle

More information about the linux-fai mailing list