From 4487af02ff6a14c3837780c79a8b7ef1cfecfc6f Mon Sep 17 00:00:00 2001 From: Allan Jude Date: Sat, 16 Jul 2016 18:28:44 +0000 Subject: [PATCH] Fix encrypted MBR install The pools are exported and reimported in order to write the bootcode This causes an error when the bootpool is later mounted by common code The bootpool is now imported with the -N flag to prevent mounting Reported by: Michael Dexter MFC after: 5 days --- usr.sbin/bsdinstall/scripts/zfsboot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index d2de12b73715..141ab7f02e77 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -1384,8 +1384,9 @@ zfs_create_boot() "-o altroot=\"$BSDINSTALL_CHROOT\"" "$zroot_name" || return $FAILURE if [ "$ZFSBOOT_BOOT_POOL" ]; then + # Import the bootpool, but do not mount it yet f_eval_catch $funcname zpool "$ZPOOL_IMPORT_WITH_OPTIONS" \ - "-o altroot=\"$BSDINSTALL_CHROOT\"" \ + "-o altroot=\"$BSDINSTALL_CHROOT\" -N" \ "$bootpool_name" || return $FAILURE fi fi