<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 24, 2017 at 6:00 PM, Dan McDonald <span dir="ltr"><<a target="_blank" href="mailto:danmcd@kebe.com">danmcd@kebe.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Given the "uuidgen" binary has WAY too many libraries, and the uniqueness of the UUID doesn't need to be super-special for the installed BE, I put together this patch using the existing miniroot tools:<br>
<br>
<br>
diff --git a/install_help.sh b/install_help.sh<br>
index 7ad5ab1..7095536 100644<br>
--- a/install_help.sh<br>
+++ b/install_help.sh<br>
@@ -115,6 +115,11 @@ BuildBE() {<br>
   $GRAB $MEDIA | pv -B 128m -w 78 | $DECOMP | zfs receive -u $RPOOL/ROOT/omnios<br>
   zfs set canmount=noauto $RPOOL/ROOT/omnios<br>
   zfs set mountpoint=legacy $RPOOL/ROOT/omnios<br>
+  # Generate UUID for BE using existing tools...<br>
+  prtconf -v | md5sum | awk '{print $1}' > /tmp/bits<br>
+  echo "`cut -b1-8 < /tmp/bits`-`cut -b9-12 < /tmp/bits`-`cut -b13-16 < /tmp/bits`-`cut -b17-20 < /tmp/bits`-`cut -b21-32 < /tmp/bits`" > /tmp/uuid<br>
+  zfs set org.opensolaris.libbe:uuid=`<wbr>cat /tmp/uuid` $RPOOL/ROOT/omnios<br>
+  zfs set org.opensolaris.libbe:policy=<wbr>static $RPOOL/ROOT/omnios<br>
   log "Cleaning up boot environment"<br>
   beadm mount omnios /mnt<br>
   ALTROOT=/mnt<br>
<br>
<br>
I initially tested by invoking the prtconf & echo commands, to make sure the resultant UUID looked correct.  I am spinning a bloody ISO as I type this to try and make sure it ACTUALLY works.<br></blockquote><div><br></div><div>ptrconf -v isn't terribly random - it looks like you get a fairly small set.<br><br></div><div>My version (lifted from Tribblix) would look like<br><br>head -c 32 /dev/urandom | md5sum | awk '{print $1}' > /tmp/bits<br>echo "`cut -b1-8 < /tmp/bits`-`cut -b9-12 < /tmp/bits`-5`cut 
-b14-16 < /tmp/bits`-9`cut -b18-20 < /tmp/bits`-`cut -b21-32 < 
/tmp/bits`" > /tmp/uuid<br>
</div></div><br>-- <br><div class="gmail_signature">-Peter Tribble<br><a target="_blank" href="http://www.petertribble.co.uk/">http://www.petertribble.co.uk/</a> - <a target="_blank" href="http://ptribble.blogspot.com/">http://ptribble.blogspot.com/</a></div>
</div></div>