Debian 10 hangs during booting on Phicomm N1Section 5.1.4 in Debian 10’s Release Notes explained this, and suggested using haveged
to populate system’s entropy.
However, haveged
does not work correctly on my N1 box, reporting:
1 haveged[1234]: haveged: Couldn't initialize HAVEGE rng 5
From haveged
‘s man page, the reason is “Invalid data or instruction cache size.”.
To fix this, patch /etc/default/haveged
with:
12345678 --- a 2019-07-08 00:00:00.000000000 +0800--- b 2019-07-08 00:00:00.000000000 +0800@@ -2,4 +2,4 @@ # Options to pass to haveged: # -w sets low entropy watermark (in bits)-DAEMON_ARGS="-w 1024"+DAEMON_ARGS="-w 1024 -d16"
The weird thing is that although haveged
‘s help message (haveged --help
) explicitly states that it uses 16KiB d-cache size as a fallback, it doesn’t work unless d-cache size is specified in it’s arguments.
Section 5.1.4 in Debian 10’s Release Notes explained this, and suggested using haveged
to populate system’s entropy.
However, haveged
does not work correctly on my N1 box, reporting:
1 | haveged[1234]: haveged: Couldn't initialize HAVEGE rng 5 |
From haveged
‘s man page, the reason is “Invalid data or instruction cache size.”.
To fix this, patch /etc/default/haveged
with:
1 2 3 4 5 6 7 8 | --- a 2019-07-08 00:00:00.000000000 +0800 --- b 2019-07-08 00:00:00.000000000 +0800 @@ -2,4 +2,4 @@ # Options to pass to haveged: # -w sets low entropy watermark (in bits) -DAEMON_ARGS="-w 1024" +DAEMON_ARGS="-w 1024 -d16" |
The weird thing is that although haveged
‘s help message (haveged --help
) explicitly states that it uses 16KiB d-cache size as a fallback, it doesn’t work unless d-cache size is specified in it’s arguments.
actually N1 has hwrng:
/usr/bin/rngd -f -o /dev/random -r /dev/hwrng -x jitter -x pkcs11
Nice discovery. I didn’t realize that. Thanks for sharing.