--- old/build_image.sh	Wed Jan 25 15:02:41 2017
+++ new/build_image.sh	Wed Jan 25 15:02:41 2017
@@ -119,7 +119,7 @@
 	system/poold.xml system/dumpadm.xml"
 
 SYSTEM="system/boot/grub system/boot/real-mode system/boot/wanboot/internal
-	system/boot/wanboot system/data/hardware-registry
+	system/boot/loader system/boot/wanboot system/data/hardware-registry
 	system/data/keyboard/keytables system/data/terminfo
 	system/data/zoneinfo system/extended-system-utilities
 	system/file-system/autofs system/file-system/nfs
--- old/data/boot	Wed Jan 25 15:02:42 2017
+++ new/data/boot	Wed Jan 25 15:02:42 2017
@@ -1,4 +1,39 @@
 0 /boot
+0 /boot/cdboot
+0 /boot/conf.d
+0 /boot/defaults
+0 /boot/defaults/loader.conf
+0 /boot/forth
+0 /boot/forth/beadm.4th
+0 /boot/forth/beastie.4th
+0 /boot/forth/brand-illumos.4th
+0 /boot/forth/brand.4th
+0 /boot/forth/check-password.4th
+0 /boot/forth/color.4th
+0 /boot/forth/delay.4th
+0 /boot/forth/frames.4th
+0 /boot/forth/loader.4th
+0 /boot/forth/logo-beastie.4th
+0 /boot/forth/logo-beastiebw.4th
+0 /boot/forth/logo-fbsdbw.4th
+0 /boot/forth/logo-illumos.4th
+0 /boot/forth/logo-orb.4th
+0 /boot/forth/logo-orbbw.4th
+0 /boot/forth/menu-commands.4th
+0 /boot/forth/menu.4th
+0 /boot/forth/menu.rc
+0 /boot/forth/menusets.4th
+0 /boot/forth/pcibios.4th
+0 /boot/forth/screen.4th
+0 /boot/forth/shortcuts.4th
+0 /boot/forth/support.4th
+0 /boot/forth/version.4th
+0 /boot/gptzfsboot
+0 /boot/loader.help
+0 /boot/loader.rc
+0 /boot/pmbr
+0 /boot/pxeboot
+0 /boot/zfsloader
 0 /boot/splashimage.xpm
 0 /boot/acpi
 0 /boot/acpi/tables
--- old/data/etc	Wed Jan 25 15:02:42 2017
+++ new/data/etc	Wed Jan 25 15:02:42 2017
@@ -711,7 +711,6 @@
 0 /etc/ftpd
 0 /etc/ftpd/ftpusers
 0 /etc/default
-0 /etc/default/be
 0 /etc/default/ipsec
 0 /etc/default/inetinit
 0 /etc/default/nss
--- old/disk_help.sh	Wed Jan 25 15:02:42 2017
+++ new/disk_help.sh	Wed Jan 25 15:02:42 2017
@@ -91,15 +91,6 @@
     ListDisksAnd $term
   done | sort | uniq | xargs
 }
-SMIboot() {
-  DISK=$1
-  RDSK=/dev/rdsk/${DISK}p0
-  S2=/dev/rdsk/${DISK}s2
-  fdisk -B ${RDSK}
-  disks -C
-  prtvtoc -h ${RDSK} | awk '/./{p=0;} {if($1=="2"){size=$5;p=1;} if($1=="8"){start=$5;p=1;} if(p==1){print $1" "$2" "$3" "$4" "$5;}} END{size=size-start; print "0 2 00 "start" "size;}' | sort -n | fmthard -s /dev/stdin $S2
-  disks -C
-}
 
 BuildRpool() {
   ztype=""
@@ -109,18 +100,20 @@
   if [[ -z "$disks" ]]; then
     bomb "No matching disks found to build rpool"
   fi
+  rm -f /tmp/kayak-disk-list
   for i in $disks
   do
-    SMIboot $i
     if [[ -n "$ztgt" ]]; then
       ztype="mirror"
     fi
-    ztgt="$ztgt ${i}s0"
-    INSTALL_GRUB_TGT="$INSTALL_GRUB_TGT /dev/rsdk/${i}s2"
+    ztgt="$ztgt ${i}"
+    # Keep track of disks for later...
+    echo ${i} >> /tmp/kayak-disk-list
   done
   log "zpool destroy rpool (just in case we've been run twice)"
   zpool destroy rpool 2> /dev/null
   log "Creating rpool with: zpool create -f rpool $ztype $ztgt"
+  # Just let "zpool create" do its thing. We want GPT disks now.
   zpool create -f rpool $ztype $ztgt || bomb "Failed to create rpool"
   BuildBE
 }
--- old/install_help.sh	Wed Jan 25 15:02:42 2017
+++ new/install_help.sh	Wed Jan 25 15:02:42 2017
@@ -150,24 +150,18 @@
 
 MakeBootable(){
   log "Making boot environment bootable"
-  mkdir -p /rpool/boot/grub/bootsign || bomb "mkdir rpool/boot/grub failed"
-  touch /rpool/boot/grub/bootsign/pool_rpool || bomb "making bootsign failed"
-  chown -R root:root /rpool/boot || bomb "rpool/boot chown failed"
-  chmod 444 /rpool/boot/grub/bootsign/pool_rpool || bomb "chmod bootsign failed"
-  for f in capability menu.lst splash.xpm.gz ; do
-    cp -p $ALTROOT/boot/grub/$f /rpool/boot/grub/$f || \
-      bomb "setup rpool/boot/grub/$f failed"
+  zpool set bootfs=rpool/ROOT/omnios rpool
+  # Must do beadm activate first on the off chance we're bootstrapping from
+  # GRUB.
+  beadm activate omnios
+
+  # NOTE:  This installboot loop assumes we're doing GPT whole-disk rpools.
+  for i in `cat /tmp/kayak-disk-list`
+  do
+    installboot -mf /boot/pmbr /boot/gptzfsboot /dev/rdsk/${i}s0
   done
-  zpool set bootfs=rpool/ROOT/omnios rpool || bomb "setting bootfs failed"
-  beadm activate omnios || bomb "activating be failed"
-  $ALTROOT/boot/solaris/bin/update_grub -R $ALTROOT
+
   bootadm update-archive -R $ALTROOT
-  RELEASE=`head -1 $ALTROOT/etc/release | sed -e 's/ *//;'`
-  sed -i -e '/BOOTADM/,/BOOTADM/d' /rpool/boot/grub/menu.lst
-  sed -i -e "s/^title.*/title $RELEASE/;" /rpool/boot/grub/menu.lst
-  SendInstallLog
-  CopyInstallLog
-  beadm umount omnios
   return 0
 }
 
