Hi,

I can't seem to find an explanation what is the purpose of random.seed
from sysadmin's point of view. Any good soul out there to point me in
the right direction?

The reason why I am asking is the fact that I am preparing pcengines
apu box which needs to be read-only because of reduced sdcard wear but
also because it is going to be placed in remote environment with
frequent power outages (daily manual fscks expected if / is rw).

I am achieving this by putting ro record in fstab for (the only) /
partition and moving /dev, /var and /tmp to mfs and tmpfs mounts.

I am concerned about shutdown message about inability to dd random.seed
because of read-only file system. What would be the implications of not
writing it on shutdown?

Also does the following modification to rc look reasonable (not a
patch file, I've just put "+" sign to make change more visible)?

random_seed()
{
+       # make / read-write in order to make next lines possible
+       /sbin/mount -uw /
        # push the old seed into the kernel
        dd if=/var/db/host.random of=/dev/random bs=65536 count=1
status=none chmod 600 /var/db/host.random
        # ... and create a future seed
        dd if=/dev/random of=/var/db/host.random bs=65536 count=1
status=none # and create a seed file for the boot-loader
        dd if=/dev/random of=/etc/random.seed bs=512 count=1 status=none
        chmod 600 /etc/random.seed
+       # make / read-only again
+       /sbin/mount -ur /
}

Thank you in advance.
--
Before enlightenment - chop wood, draw water.
After  enlightenment - chop wood, draw water.

Marko Cupać
https://www.mimar.rs/

Reply via email to