Overriding the zpool bootfs property from the loader?
Florian Wagner
florian at wagner-flo.net
Fri Mar 23 14:01:39 UTC 2012
On Fri, 23 Mar 2012 13:12:45 +0000
Matthew Seaman <matthew at FreeBSD.org> wrote:
> On 23/03/2012 12:15, Florian Wagner wrote:
> > 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].
>
> Yes, this looks like pretty much what I was asking for. So, if I
> understand this correctly, given a root zpool named 'zroot' and a
> number of ZFSes with different boot environments ( zroot/ROOT/FOO,
> zroot/ROOT/BAR, etc.) I could interrupt the boot before the menu
> screen and just type at the boot: prompt --
>
> zfs:zroot/ROOT/FOO:boot/zfsloader
>
> or
>
> zfs:zroot/ROOT/BAR:boot/zfsloader
>
> to select different environments. Is that right? I'll give your
> patches a go over the weekend -- I'm on stable/9 though.
Actually the format is <POOL>:<DATASET>:<FILE> and <FILE> is optional
and defaults to /boot/zfsloader. So examples would zroot:ROOT/FOO: or
zroot:ROOT/BAR:/boot/zfsloader.
I think this is documented incorrectly in one of the commits in the
avgbsd repository. Obviously boot(8) should be updated correctly...
For reference, setup on my fileserver looks link this:
$ zpool get bootfs root
NAME PROPERTY VALUE SOURCE
root bootfs root/boot-config local
$ mount | grep root/boot-config
root/boot-config on /boot/config (zfs, local, nfsv4acls)
$ cat /boot/config/boot.config
root:stable8-r232838:
Regards
Florian
-------------- 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/de519e44/signature.pgp
More information about the freebsd-fs
mailing list