Extending zfsboot.c to allow selecting filesystem from boot.config

Florian Wagner florian at wagner-flo.net
Sat Oct 15 20:03:00 UTC 2011


Hi,

from looking at the code in sys/boot/i386/zfsboot/zfsboot.c the ZFS
aware boot block already allows to select pool to load the kernel from
by adding <POOL>:<FILE TO BOOT> to the boot.config. As this code calls
the zfs_mount_pool function it will look for the bootfs property on the
new pool or use its root dataset to get the file from there.

How much work would it be to extend the loader to also allow selecting
a ZFS filesystem?

What I'd like to do is place a boot.config on the (otherwise empty) root
of my system pool and then tell it to get the loader from another
filesystem by putting "rpool/root/stable-8-r226381:/boot/zfsloader" in
there.


Regards
Florian Wagner
-------------- 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/20111015/1f263237/signature.pgp


More information about the freebsd-fs mailing list