#! /bin/bash # Possible usage: # ALTROOT=/mnt/aux/ mk-grub-random.sh # I hate redirecting stderr ... but dd gives me # no other way to reduce verbosity. randomseed=$(2>/dev/null dd iflag=fullblock \ if=/dev/urandom count=1 bs=24 | base64) # Note the 0: here. # It means zero bits of physics entropy, # i.e. pseudorandom, not true random grub-editenv ${ALTROOT}/boot/grub/grubenv set randomseed="0:$randomseed"