From fc070c691e8a30e91eeb501a2a444aa243cb7b96 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Thu, 21 Nov 2019 15:35:35 +0100 Subject: [PATCH] Fix IPA execution issues due to lack of entropy While running TinyIPA stable/stein images in KVM virtual machines with Tenks, we noticed that IPA would start but not execute further, which appeared to be caused by a lack of entropy. This patch installs haveged, a simple entropy daemon [1], into the tinyipa ramdisk and starts it on boot, which resolves the issue. While this problem was reproduced reliably with stable/stein and not seen with stable/train or stable/rocky images, we will start running haveged in all versions, for consistency. It adds less than 20 KiB to the ramdisk. [1] http://www.issihosts.com/haveged/ Change-Id: I7d47b7828733cc03c1ed6c370c451465a6d492b6 Story: 2006911 Task: 37554 --- tinyipa/build_files/bootlocal.sh | 8 +++++++- tinyipa/build_files/finalreqs.lst | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tinyipa/build_files/bootlocal.sh b/tinyipa/build_files/bootlocal.sh index 0fcf0b4..1d8102d 100755 --- a/tinyipa/build_files/bootlocal.sh +++ b/tinyipa/build_files/bootlocal.sh @@ -10,11 +10,17 @@ date export HOME=/root # Start SSHd -if [ -f /usr/local/etc/init.d/openssh ]; then +if [ -x /usr/local/etc/init.d/openssh ]; then echo "Starting OpenSSH server:" /usr/local/etc/init.d/openssh start fi +# Start haveged +if [ -x /usr/local/sbin/haveged ]; then + echo "Starting haveged entropy daemon:" + /usr/local/sbin/haveged +fi + # Maybe save some RAM? #rm -rf /tmp/builtin diff --git a/tinyipa/build_files/finalreqs.lst b/tinyipa/build_files/finalreqs.lst index d5f9a72..11be25f 100644 --- a/tinyipa/build_files/finalreqs.lst +++ b/tinyipa/build_files/finalreqs.lst @@ -4,6 +4,7 @@ dmidecode.tcz gdisk.tcz glib2.tcz file.tcz +haveged.tcz hdparm.tcz iproute2.tcz ipv6-4.14.10-tinycore64.tcz @@ -16,4 +17,4 @@ raid-dm-4.14.10-tinycore64.tcz scsi-4.14.10-tinycore64.tcz smartmontools.tcz udev-lib.tcz -util-linux.tcz \ No newline at end of file +util-linux.tcz