freebsd-dev/sys/boot/i386/common
Andriy Gapon 97371ba2a9 zfsbootcfg: a simple tool to set next boot (one time) options for zfsboot
(gpt)zfsboot will read one-time boot directives from a special ZFS pool
area.  The area was previously described as "Boot Block Header", but
currently it is know as Pad2, marked as reserved and is zeroed out on
pool creation.  The new code interprets data in this area, if any, using
the same format as boot.config.  The area is immediately wiped out.
Failure to parse the directives results in a reboot right after the
cleanup.  Otherwise the boot sequence proceeds as usual.

zfsbootcfg writes zfsboot arguments specified on its command line to the
Pad2 area of a disk identified by vfs.zfs.boot.primary_pool and
vfs.zfs.boot.primary_vdev kenv variables that are set by loader during
boot.  Please see the manual page for more.

Thanks to all who reviewed, contributed and made suggestions!  There are
many potential improvements to the feature, please see the review for
details.

Reviewed by:	wblock (docs)
Discussed with:	jhb, tsoome
MFC after:	3 weeks
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D7612
2016-10-29 14:09:32 +00:00
..
bootargs.h Implement GELI (AES-XTS and AES-CBC only) in gptboot and gptzfsboot 2016-03-16 23:12:19 +00:00
cons.c Implement GELI (AES-XTS and AES-CBC only) in gptboot and gptzfsboot 2016-03-16 23:12:19 +00:00
cons.h Add missing prototype for getchar(..) 2016-05-13 10:59:46 +00:00
drv.c zfsbootcfg: a simple tool to set next boot (one time) options for zfsboot 2016-10-29 14:09:32 +00:00
drv.h zfsbootcfg: a simple tool to set next boot (one time) options for zfsboot 2016-10-29 14:09:32 +00:00
edd.h