2020/02/15

"random: crng init done"で時間がかかる。"random: crng init done" took too long during boot - solved.

Linuxの起動が遅い。dmesgでみると、"random: crng init done"に6~8分位かかっている。
結論から言うと、Kernelのconfigで
CONFIG_RANDOM_TRUST_CPU=y
とすれば解決した。


My linux box boots up very slow. dmesg said "random: crng init done" took 6-8 min.
In a nutshell, it is resolved with changing kernel config to;
CONFIG_RANDOM_TRUST_CPU=y
Before
# grep crng /var/log/kern.log
Feb  9 18:16:22 edo kernel: [    0.164415] random: get_random_bytes called from start_kernel+0x92/0x4cf with crng_init=0
Feb  9 18:16:22 edo kernel: [  479.953118] random: crng init done
Feb 12 08:32:46 edo kernel: [    0.164832] random: get_random_bytes called from start_kernel+0x92/0x4cf with crng_init=0
Feb 12 08:32:46 edo kernel: [  465.597800] random: crng init done
Feb 15 09:24:44 edo kernel: [    0.165996] random: get_random_bytes called from start_kernel+0x92/0x4cf with crng_init=0
Feb 15 09:24:44 edo kernel: [  370.184682] random: crng init done


After
Feb 15 10:15:44 edo kernel: [    0.166575] random: get_random_bytes called from start_kernel+0x92/0x4cf with crng_init=0
Feb 15 10:15:44 edo kernel: [    0.211472] random: crng done (trusting CPU's manufacturer)

0 件のコメント: