aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bsdinstall
diff options
context:
space:
mode:
authorDevin Teske <dteske@FreeBSD.org>2013-12-19 06:43:52 +0000
committerDevin Teske <dteske@FreeBSD.org>2013-12-19 06:43:52 +0000
commit6311cc9efe05fa738d4209f985ac1ae80a85d2c8 (patch)
tree32b3acd6970f72484c8a57180e1132fc72dbee99 /usr.sbin/bsdinstall
parent4b4b90d5a8666f0f5165477d938ebb3e31cb9120 (diff)
downloadsrc-6311cc9efe05fa738d4209f985ac1ae80a85d2c8.tar.gz
src-6311cc9efe05fa738d4209f985ac1ae80a85d2c8.zip
Notes
Diffstat (limited to 'usr.sbin/bsdinstall')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/zfsboot8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot
index 61a90cbf7b5a..e1102b6c749f 100755
--- a/usr.sbin/bsdinstall/scripts/zfsboot
+++ b/usr.sbin/bsdinstall/scripts/zfsboot
@@ -1152,7 +1152,7 @@ zfs_create_boot()
fi
# While this is apparently not needed, it seems to help MBR
- f_dprintf "$funcname: Configuring zpool.cache..."
+ f_dprintf "$funcname: Configuring zpool.cache for zroot..."
f_eval_catch $funcname mkdir "$MKDIR_P" $BSDINSTALL_CHROOT/boot/zfs ||
return $FAILURE
f_eval_catch $funcname zpool "$ZPOOL_SET" \
@@ -1174,6 +1174,12 @@ zfs_create_boot()
# We're all done unless we should go on for boot pool
[ "$ZFSBOOT_BOOT_POOL" ] || return $SUCCESS
+ # Set cachefile for boot pool so it auto-imports at system start
+ f_dprintf "$funcname: Configuring zpool.cache for boot pool..."
+ f_eval_catch $funcname zpool "$ZPOOL_SET" \
+ "cachefile=\"$BSDINSTALL_CHROOT/boot/zfs/zpool.cache\"" \
+ "$bootpool_name" || return $FAILURE
+
# Some additional geli(8) requirements for loader.conf(5)
for option in \
'zpool_cache_load=\"YES\"' \