3 ms·
It's wrong to use during system startup as it may not have been seeded yet.
by richardwhiuk 10y ago
It's wrong to use during system startup as it may not have been seeded yet.
- Nursie 10y agoThat's true, but likely only true during the first ever boot due to entropy recycling.
- Dylan16807 10y agoOr the first boot after you clone the template VM, which could be any boot.
- matt_wulfeck 10y agoAs long as it's not the first system startup, on a headless machine with little in way of devices. Then you run the risk of generating a number without a seed. But the risk is low, since things like disk IO read times and other such will seed the generator unpredictable ways. Linux is smart enough to squirrel away some random on reboots so that it can properly seed the generator when it starts up again. On my system it looks like it's 512 bytes: $ wc -c /var/lib/urandom/random-seed 512 /var/lib/urandom/random-seed