[OmniOS-discuss] Fix for no UUID in Kayak-installed BE?

Dan McDonald danmcd at kebe.com
Wed May 24 17:00:48 UTC 2017


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:


diff --git a/install_help.sh b/install_help.sh
index 7ad5ab1..7095536 100644
--- a/install_help.sh
+++ b/install_help.sh
@@ -115,6 +115,11 @@ BuildBE() {
   $GRAB $MEDIA | pv -B 128m -w 78 | $DECOMP | zfs receive -u $RPOOL/ROOT/omnios
   zfs set canmount=noauto $RPOOL/ROOT/omnios
   zfs set mountpoint=legacy $RPOOL/ROOT/omnios
+  # Generate UUID for BE using existing tools...
+  prtconf -v | md5sum | awk '{print $1}' > /tmp/bits
+  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
+  zfs set org.opensolaris.libbe:uuid=`cat /tmp/uuid` $RPOOL/ROOT/omnios
+  zfs set org.opensolaris.libbe:policy=static $RPOOL/ROOT/omnios
   log "Cleaning up boot environment"
   beadm mount omnios /mnt
   ALTROOT=/mnt


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.

Thanks,
Dan




More information about the OmniOS-discuss mailing list