View Single Post
Old 27th September 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

At OpenBSD 6.1-release, the OpenBSD install/upgrade scripts will create the random.seed file in /mnt/etc. /mnt is where the new root partition is mounted.
Code:
dd if=/dev/random of=/mnt/etc/random.seed bs=512 count=1 status=none
On a running system that is shut down, init(8) calls rc(8) to run its shutdown routines, which includes a call to the random.seed() function to apply the old seed and create a new one.
Code:
random_seed() {
        # 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
}
Reply With Quote