Overriding the zpool bootfs property from the loader?

Florian Wagner florian at wagner-flo.net
Fri Mar 23 12:15:20 UTC 2012


On Fri, 23 Mar 2012 11:49:38 +0000
Matthew Seaman <matthew at FreeBSD.org> wrote:

> 
> Dear all,
> 
> I've been playing around with using ZFS boot environments recently,
> and been pretty pleased with the concept in general.
> 
> 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.
> 
> Apparently this sort of functionality is possible in Solaris, by using
> 'boot -Z' or 'boot -L' from the 'ok' prompt:
> 
>     http://docs.oracle.com/cd/E19082-01/817-2271/ggpco/index.html
> 
> 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/extended-zfsboot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20120323/db695b55/signature.pgp


More information about the freebsd-fs mailing list