From owner-freebsd-fs@FreeBSD.ORG Fri Mar 23 12:15:19 2012 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED95F106564A; Fri, 23 Mar 2012 12:15:19 +0000 (UTC) (envelope-from florian@wagner-flo.net) Received: from umbracor.wagner-flo.net (umbracor.wagner-flo.net [213.165.81.202]) by mx1.freebsd.org (Postfix) with ESMTP id AAB748FC18; Fri, 23 Mar 2012 12:15:19 +0000 (UTC) Received: from auedv3.syscomp.de (umbracor.wagner-flo.net [127.0.0.1]) by umbracor.wagner-flo.net (Postfix) with ESMTPSA id DE1823C058F6; Fri, 23 Mar 2012 13:15:11 +0100 (CET) Date: Fri, 23 Mar 2012 13:15:08 +0100 From: Florian Wagner To: Matthew Seaman Message-ID: <20120323131508.0272be25@auedv3.syscomp.de> In-Reply-To: <4F6C6352.9090906@FreeBSD.org> References: <4F6C6352.9090906@FreeBSD.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/EPQNPmAE+40JCUlI6cQOR/2"; protocol="application/pgp-signature" Cc: freebsd-fs@FreeBSD.org Subject: Re: Overriding the zpool bootfs property from the loader? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2012 12:15:20 -0000 --Sig_/EPQNPmAE+40JCUlI6cQOR/2 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 23 Mar 2012 11:49:38 +0000 Matthew Seaman wrote: >=20 > Dear all, >=20 > I've been playing around with using ZFS boot environments recently, > and been pretty pleased with the concept in general. >=20 > One thing I'd love to be able to do, but which I can't find any > description of for FreeBSD, is to be able to override the bootfs > property of the root zpool at an early stage in the boot process -- > eg. by escaping to the loader prompt. This would facilitate easily > switching between different boot environments, and be particularly > useful if the default boot environment had somehow been rendered > unbootable. >=20 > Apparently this sort of functionality is possible in Solaris, by using > 'boot -Z' or 'boot -L' from the 'ok' prompt: >=20 > http://docs.oracle.com/cd/E19082-01/817-2271/ggpco/index.html >=20 > Any clues on whether the equivalent is possible in FreeBSD and if so > how would be gratefully received. I've recently discussed more or less the same on this list. The thread is called "Extending zfsboot.c to allow selecting filesystem from boot.config" and available in the mailing list archives of October, November 2011 and Januar 2012. Summary: Andriy Gapon has a bunch of changes against head in his avgbsd repository [1] which implement something like this. With his help I've backported these to stable 8. I've just recently gone over the work and put together a culminating patch, which I've tested as extensively as possible in my at-home environment. This is available as a Mercurial patch queue at [2] or directly at [3]. Regards Florian [1] http://gitorious.org/~avg/freebsd/avgbsd [2] http://bitbucket.org/wagnerflo/freebsd-stable8-patches [3] http://bitbucket.org/wagnerflo/freebsd-stable8-patches/raw/default/exte= nded-zfsboot --Sig_/EPQNPmAE+40JCUlI6cQOR/2 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAk9saUwACgkQLvW/2gp2pPz34wCgii44G7Sxc+KUEL8stP/S1TQM AzIAniFvy+RtgR5ob21FMJtdLZ4XBXnF =QOYR -----END PGP SIGNATURE----- --Sig_/EPQNPmAE+40JCUlI6cQOR/2--