Index: sys/dev/random/random_harvestq.c =================================================================== --- sys/dev/random/random_harvestq.c +++ sys/dev/random/random_harvestq.c @@ -442,6 +442,31 @@ if (bootverbose) printf("random: no preloaded entropy cache\n"); } + + /* + * Finally, if no or insufficient early entropy was available to seed + * us, attempt to poll fast random sources until we're seeded. + * + * If none are available, produce a warning and proceed. + */ + if (!is_random_seeded()) { + struct random_sources *rs; + unsigned count; + + count = 0; + LIST_FOREACH(rs, &source_list, rrs_entries) + count++; + + if (count == 0) { + printf("%s: WARNING no early entropy available and no " + "fast random sources available; random will not be" + " available during early boot.\n", __func__); + return; + } + + while (!is_random_seeded()) + random_sources_feed(); + } } SYSINIT(random_device_prime, SI_SUB_RANDOM, SI_ORDER_FOURTH, random_harvestq_prime, NULL);