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
This commit is contained in:
Allan Jude 2016-07-16 18:28:44 +00:00
parent 01a469b860
commit 4487af02ff

View File

@ -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