ZFS Boot patch

Allan Jude freebsd at allanjude.com
Wed Dec 18 17:27:39 UTC 2013


An issue we thought we had fixed, was not actually fixed.

When doing a GELI based Root-on-ZFS install, the 'bootpool' is not
always properly mounted in the installed system.

The lines added to loader.conf to make it use the zpool.cache file and
learn of the existence of the 2nd pool are required, and have the
desired effect.

However, it seems that the 2nd pool is not always listed in the cache file.

The attached patch should fix this issue.

Hopefully this can get MFCd in time for the next RC


-- 
Allan Jude
-------------- next part --------------
Index: usr.sbin/bsdinstall/scripts/zfsboot
===================================================================
--- usr.sbin/bsdinstall/scripts/zfsboot	(revision 259561)
+++ usr.sbin/bsdinstall/scripts/zfsboot	(working copy)
@@ -1156,6 +1156,11 @@
 	f_eval_catch $funcname zpool "$ZPOOL_SET" \
 	             "cachefile=\"$BSDINSTALL_CHROOT/boot/zfs/zpool.cache\"" \
 	             "$zroot_name" || return $FAILURE
+	if [ "$ZFSBOOT_BOOT_POOL" ]; then
+		f_eval_catch $funcname zpool "$ZPOOL_SET" \
+		             "cachefile=\"$BSDINSTALL_CHROOT/boot/zfs/zpool.cache\"" \
+		             "$bootpool_name" || return $FAILURE
+	fi
 
 	# Last, but not least... required lines for rc.conf(5)/loader.conf(5)
 	# NOTE: We later concatenate these into their destination
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20131218/7964ed14/attachment.sig>


More information about the freebsd-current mailing list