Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Oct 2013 14:18:15 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r256540 - head/usr.sbin/bsdinstall/scripts
Message-ID:  <201310151418.r9FEIFh5055953@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Tue Oct 15 14:18:15 2013
New Revision: 256540
URL: http://svnweb.freebsd.org/changeset/base/256540

Log:
  gjb writes: when doing encrypted zfs install, loader.conf should be updated
  so bootpool is imported after boot:
          zpool_cache_load="YES"
          zpool_cache_type="/boot/zfs/zpool.cache"
          zpool_cache_name="/boot/zfs/zpool.cache"
  otherwise /boot is a broken symlink after the system is up.
  http://lists.freebsd.org/pipermail/freebsd-fs/2013-July/017891.html
  NOTE: Fix a comment while here.
  
  Reviewed by:	gjb

Modified:
  head/usr.sbin/bsdinstall/scripts/zfsboot

Modified: head/usr.sbin/bsdinstall/scripts/zfsboot
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/zfsboot	Tue Oct 15 13:53:35 2013	(r256539)
+++ head/usr.sbin/bsdinstall/scripts/zfsboot	Tue Oct 15 14:18:15 2013	(r256540)
@@ -802,7 +802,7 @@ zfs_create_boot()
 	zpool set cachefile=$BSDINSTALL_CHROOT/boot/zfs/zpool.cache \
 		"$poolname" || return $FAILURE
 
-	# Last, but not least... add required lines to rc.conf(5)
+	# Last, but not least... required lines for rc.conf(5)/loader.conf(5)
 	# NOTE: We later concatenate these into their destination
 	echo 'zfs_enable="YES"' > $BSDINSTALL_TMPETC/rc.conf.zfs ||
 		return $FAILURE
@@ -812,6 +812,14 @@ zfs_create_boot()
 	# We're all done unless we should go on to do encryption
 	[ "$ZFSBOOT_GELI_ENCRYPTION" ] || return $SUCCESS
 
+	# Some additional GELI requirements for loader.conf(5)
+	echo 'zpool_cache_load="YES"' \
+		>> $BSDINSTALL_TMPETC/loader.conf.zfs || return $FAILURE
+	echo 'zpool_cache_type="/boot/zfs/zpool.cache"' \
+		>> $BSDINSTALL_TMPETC/loader.conf.zfs || return $FAILURE
+	echo 'zpool_cache_name="/boot/zfs/zpool.cache"' \
+		>> $BSDINSTALL_TMPETC/loader.conf.zfs || return $FAILURE
+
 	#
 	# Configure geli(8)-based encryption
 	#



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310151418.r9FEIFh5055953>