On Tue 07/Jul/2026 16:32:19 +0200 Nick wrote:
> On 7/7/26 1:56 PM, Alessandro Vesely via Dng wrote:
>> Hi all,
>>
>> after a (successful) boot, dmesg shows lines like the following:
>>
>> [ 1.037451] udevd[225]: starting version 3.2.14
>> [ 2.041066] random: crng init done
>> [ 2.042598] udevd[227]: starting eudev-3.2.14
>>
>> That middle log is printed by random.c:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/
>> drivers/char/random.c#n738
>>
>> The udevd init file stays at /etc/rcS.d/S02udev.
>>
>> Unsuccessful boots hang at the first line shown above. Alt-SysRq-b to try
>> again. Usually after a few trials it succeeds. Yesterday, however, it took
>> hours to do 30+ attempts. This bug is described here:
>> https://unix.stackexchange.com/questions/442698/when-i-log-in-it-hangs-until-crng-init-done#answer-442744
>>
>> I had installed haveged; to no avail, since no init script was installed.
>> Now I reported this:
>> https://bugs.devuan.org/cgi/bugreport.cgi?bug=968
>>
>> However, after manually installing the init script provided in the package,
>> it does not get linked in rcS.d. If I insert an "S" before "2 3 4 5" of
>> Default-Start, I get some warnings:
>>
>> Script haveged requires $remote_fs, which is not provided directly at level SS
>> Script haveged optionally requires $syslog, which is not provided directly at level SS
>> Script haveged requires $local_fs, which is not provided directly at level SS
>> Script haveged optionally requires mountnfs, provided by mountnfs.sh, which is not enabled at S level S
>> Script haveged optionally requires mountnfs-bootclean, provided by mountnfs-bootclean.sh, which is not enabled at S level S
>> Script haveged optionally requires umountnfs, provided by umountnfs.sh, which is not enabled at S level S
>> Script haveged optionally requires sendsigs, provided by sendsigs, which is not enabled at S level S
>> Script haveged optionally requires rsyslog, provided by rsyslog, which is not enabled at S level S
>> Script haveged optionally requires sysklogd, which is not provided at level SS
>> Script haveged optionally requires syslog-ng, which is not provided at level SS
>> Script haveged optionally requires dsyslog, which is not provided at level SS
>> Script haveged optionally requires inetutils-syslogd, which is not provided at level SS
>> Script haveged optionally requires mountall, provided by mountall.sh (at order 10) at level SS
>> Script haveged optionally requires mountall-bootclean, provided by mountall bootclean.sh (at order 11) at level SS
>> Script haveged optionally requires mountoverflowtmp, which is not provided at level SS
>> Script haveged optionally requires umountfs, provided by umountfs, which is not enabled at S level S
>>
>>
>> Perhaps I should create a custom script that runs haveged once to generate
>> some entropy before running udev?
>
> Did you place the script in /etc/init.d and run *update-rc.d haveged defaults*?
Yup, I run an equivalent command[*], after removing the spurious "S". Then I
started it (I won't boot until next kernel update).
Not sure how useful it is to have it. It doesn't use /dev/hwrng and doesn't
run before udevd.
BTW, is some entropy retained between boots? The last boot, requiring 30+
attempts, happened a few minutes after the previous boot (I messed up the
firewall, and since I had just booted, I thought it would be quicker to boot
again than fixing manually). It had never taken so many attempts before.
Perhaps because the system had usually been running several days or months
before booting?
Best
Ale
--
[*]
https://www.tana.it/sw/fix-init/