Generating random.seed for network boot clients

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Generating random.seed for network boot clients

Alexander Hall
On 08/17/14 15:35, Clint Pachl wrote:

> Christian Weisgerber wrote, On 08/16/14 08:54:
>> On 2014-08-16, Christian Weisgerber <[hidden email]> wrote:
>>
>>> How about making etc/random.seed a named pipe and feeding chunks
>>> of /dev/random to it?
>> I've now put this into my /etc/rc.local:
>>
>> ------------------->
>> # Provide fresh random.seed for pxeboot
>>
>> if cd /tftpboot/etc; then
>>          rm -f random.seed
>>          mkfifo random.seed
>>          # do not fill up filesystem if the FIFO disappears
>>          # dd of= does not block on open
>>          sh -c 'while [ -p random.seed ]; do dd count=1 >random.seed;
>> done' \
>>              </dev/random 2>/dev/null &
>> fi
>> <-------------------
>>
>> * It blocks until random.seed is read.
>> * It doesn't run amok if random.seed is accidentally removed.
>> * It's easy to identify with ps(1).
>
> Very nice. It seems like this might be a good addition to /etc/rc
> because the OS depends on it. It's not like it's system, site, or
> application specific.

The OS itself does not depend on it. This is only for machines running
an tftpd server, in order to feed random to kernels booted over tftp.

/Alexander

12