[SOLVED] setup-alpine started from inittab hangs at repository update
#1
Sun, 2017-02-26 21:48
jstuyts
-
- Offline
- 1 year 3 weeks ago
- 2017-01-22
I am working on an installation disk image that can automatically install Alpine on another disk. I start a script from inittab
, and this script starts setup-alpine
. When setup-alpine
needs to update the repository indexes, it hangs. When I press some keys, the script continues. Here are some examples of key combinations that work:
- Alt-F2, alt-F1
- Space, backspace, space
- Ctrl-Q, ctrl-Q
I have tried redirecting the input and output of setup-alpine
in the script that starts it, but that does not solve the issue.
What could cause the hanging of setup-alpine
at this line from setup-apkrepos
: apk update --quiet $apk_root_opt && echo "done."
?
I found the cause of the problem: lack of entropy. Here are two scenarios that show it is the problem. I have changed the installation media so
haveged
is installed in the installation environment:haveged
: The installation hangs for over 2 minutes (I also waited more than 5 minutes without it continuing). When I move the mouse for a couple of seconds after the 2 minutes, the installation continues.haveged
when the network starts: The installation hangs for 50+ seconds, and then continues.I do not have good entropy sources in this test environment with virtual machines, and I doubt if the Xen virtual machines I intent to use on my real server will have good entropy sources. So I am willing to do what the following article says, even if a lot of people say it is a stupid thing to do: http://www.2uo.de/myths-about-urandom/
I will create a new topic to ask how I can switch to using
/dev/urandom
(forapk
, SSL, ...).