Index: usr.sbin/bsdinstall/scripts/zfsboot =================================================================== --- usr.sbin/bsdinstall/scripts/zfsboot (revision 273422) +++ usr.sbin/bsdinstall/scripts/zfsboot (working copy) @@ -197,6 +197,7 @@ GPART_CREATE='gpart create -s %s "%s"' GPART_DESTROY_F='gpart destroy -F "%s"' GPART_SET_ACTIVE='gpart set -a active -i %s "%s"' +GPART_SET_DISK_ACTIVE='gpart set -a active "%s"' GRAID_DELETE='graid delete "%s"' LN_SF='ln -sf "%s" "%s"' MKDIR_P='mkdir -p "%s"' @@ -870,6 +871,16 @@ zfs$index freebsd-zfs $disk || return $FAILURE f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ /dev/$disk$targetpart + + # + # 5. Set the pMBR active if booted via BIOS + # + bootmethod=$(sysctl -n machdep.bootmethod) + f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" + if [ "$bootmethod" = "BIOS" ]; then + f_eval_catch $funcname gpart \ + "$GPART_SET_DISK_ACTIVE" $disk || + return $FAILURE ;; MBR) f_dprintf "$funcname: Creating MBR layout..."