freebsd-dev/sbin
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
..
adjkerntz Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
atm Add history section for atmconfig(8) 2016-10-05 19:49:48 +00:00
badsect Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
bsdlabel Add history section for bsdlabel(8) 2016-10-05 19:56:10 +00:00
camcontrol Fix a problem in camcontrol(8) that cropped up with r307684. 2016-10-21 18:54:56 +00:00
ccdconfig ccdconfig first appeared in NetBSD 1.1 2016-10-02 23:19:05 +00:00
clri Add history section for clri(8) 2016-10-05 20:01:09 +00:00
comcontrol Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
conscontrol Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
ddb Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
devd Sort SEE ALSO section sequentially. 2016-10-08 12:53:23 +00:00
devfs Add history section for devfs(8) 2016-10-05 20:08:07 +00:00
dhclient dhclient(8): Enable numbered user class ID option 2016-09-20 19:21:41 +00:00
dmesg dmesg(8) first appeared in 3BSD. 2016-10-02 23:26:41 +00:00
dump dump(8) first appeared in V4 UNIX 2016-10-02 23:30:28 +00:00
dumpfs Use MIN macro from sys/param.h. 2016-05-02 01:40:31 +00:00
dumpon dumpon(8) appears to be present in FreeBSD 2.0.5, 2016-10-02 23:35:45 +00:00
etherswitchcfg Igor suggested moving sentence to new line. 2016-10-02 14:32:04 +00:00
fdisk Document the history of fdisk based on the original post to comp.unix.bsd by Julian Elischer [1] and the Mach 2.5 Installation notes [2]. 2016-10-05 20:21:06 +00:00
fdisk_pc98 Document the history of fdisk based on the original post to comp.unix.bsd by Julian Elischer [1] and the Mach 2.5 Installation notes [2]. 2016-10-05 20:28:04 +00:00
ffsinfo Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
fsck Add history section to fsck(8) 2016-10-05 20:31:44 +00:00
fsck_ffs Add history section to fsck_ffs(8) 2016-10-05 20:38:49 +00:00
fsck_msdosfs Mention the version of NetBSD the utility originated from. 2016-10-02 23:40:17 +00:00
fsdb Document which version of BSD first showed up in and add the version info 2016-10-02 23:44:52 +00:00
fsirand Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
gbde gbde first appeared in FreeBSD 5.0 2016-10-02 23:48:33 +00:00
geom Add missing history sections to a number of storage related man pages 2016-09-16 04:28:31 +00:00
ggate Add missing history sections to a number of storage related man pages 2016-09-16 04:28:31 +00:00
growfs Use bsdlabel as we don't have hardlink disklabel -> bsdlabel on MIPS. 2016-09-26 14:01:41 +00:00
gvinum Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
hastctl Add missing history sections to a number of storage related man pages 2016-09-16 04:28:31 +00:00
hastd Add missing history sections to a number of storage related man pages 2016-09-16 04:28:31 +00:00
ifconfig Fix spurious white space introduced in r301059 2016-10-09 03:20:58 +00:00
init Add verbosity around failed reboot(2) call. 2016-10-07 13:43:38 +00:00
ipf MFH 2016-03-02 16:14:46 +00:00
ipfw Add support for non-contiguous IPv6 masks in ipfw(8) rules. 2016-10-18 15:14:46 +00:00
iscontrol Add missing history sections to a number of storage related man pages 2016-09-16 04:28:31 +00:00
kldconfig Use nitems() from sys/param.h. 2016-04-19 04:52:13 +00:00
kldload Use nitems() from sys/param.h. 2016-04-19 04:52:51 +00:00
kldstat MFH 2016-04-04 23:55:32 +00:00
kldunload Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
ldconfig Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
md5 md5: enter capability on last fd or when acting as a filter 2016-10-19 21:07:17 +00:00
mdconfig Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
mdmfs Add missing history sections to a number of storage related man pages 2016-09-16 04:28:31 +00:00
mknod mknod appeared in V4 UNIX 2016-10-02 23:56:08 +00:00
mksnap_ffs mksnap_ffs appeared in FreeBSD 5.1. 2016-10-02 23:59:31 +00:00
mount mount(1): Simplify by using asprintf(3) 2016-09-19 18:42:58 +00:00
mount_cd9660 Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
mount_fusefs Note mount_fusefs appeared in FreeBSD 10. 2016-10-03 00:16:16 +00:00
mount_msdosfs Amend history to mention predecessor originated from 386BSD[1] & current implementation from NetBSD[2]. 2016-10-03 00:25:15 +00:00
mount_nfs Add missing history sections to a number of storage related man pages 2016-09-16 04:28:31 +00:00
mount_nullfs Note the name change from mount_null to mount_nullfs in FreeBSD 5.0. 2016-10-03 00:28:42 +00:00
mount_udf Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
mount_unionfs Note the change of name in FreeBSD 5.0. 2016-10-03 00:31:58 +00:00
nandfs Add missing history sections to a number of storage related man pages 2016-09-16 04:28:31 +00:00
natd Add history section to natd(8) 2016-10-05 20:42:35 +00:00
newfs Use MIN()/MAX() macros from sys/param.h. 2016-05-02 00:45:46 +00:00
newfs_msdos The code only converts from bpbHugeSectors to bpbSectors if the sum of 2016-08-30 18:01:26 +00:00
newfs_nandfs sbin: use our howmany() macro when available through <sys/param.h>. 2016-05-01 02:19:49 +00:00
nfsiod Explicitly add more files to the 'runtime' package. 2016-02-09 20:19:31 +00:00
nos-tun Add history section to nos-tun(8) 2016-10-05 20:45:21 +00:00
nvmecontrol Add missing history sections to a number of storage related man pages 2016-09-16 04:28:31 +00:00
pfctl pf: port extended DSCP support from OpenBSD 2016-10-13 20:34:44 +00:00
pflogd Create packages for atm, ccdconfig, devd, ipf, ipfw, 2016-02-09 19:30:31 +00:00
ping Check for socket creation success before calling bind(). 2016-05-12 05:43:54 +00:00
ping6 Fix a regression introduced on revision r271909, when using argument -g 2016-07-05 07:01:42 +00:00
quotacheck For pointers use NULL instead of 0. 2016-05-16 00:36:12 +00:00
rcorder sbin/rcorder/rcorder.8: Amend HISTORY 2016-09-16 04:08:34 +00:00
reboot sbin/reboot/reboot.8: Amend HISTORY 2016-09-16 04:11:04 +00:00
recoverdisk sbin: ake use of our rounddown() macro when sys/param.h is available. 2016-05-01 02:24:05 +00:00
resolvconf Fix missing substitution of @SBINDIR@ in resolvconf scripts 2016-08-23 02:06:20 +00:00
restore restore: promote some getfiles() parameters to size_t. 2016-05-01 21:17:30 +00:00
route Due to dropped mbuf in netisr queue route(8) can fall into infinity 2016-07-27 08:26:34 +00:00
routed routed(8): Use arc4random_uniform instead of arc4random. 2016-05-15 06:06:22 +00:00
rtsol Create packages for atm, ccdconfig, devd, ipf, ipfw, 2016-02-09 19:30:31 +00:00
savecore savecore(8): Fix buffer overrun inspecting disks with varying sector size 2016-10-06 05:16:44 +00:00
sconfig sconfig appeared in FreeBSD 5.2. 2016-10-03 00:40:20 +00:00
setkey setkey appeared in FreeBSD 4.0 2016-10-03 00:42:25 +00:00
shutdown shutdown appeared as a standalone utility in 4.1BSD. 2016-10-03 00:55:18 +00:00
spppcontrol Add META_MODE support. 2015-06-13 19:20:56 +00:00
sunlabel Re-ident lines. 2016-04-20 01:35:09 +00:00
swapon swapoff: Remove only late devices with -aL. 2016-10-21 21:55:50 +00:00
sysctl Consolidate four efi_next_descriptor() definitions. 2016-09-18 17:38:02 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
tunefs Mention fsck_ffs -E in tunefs(8). It's non-obvious that one should 2016-04-19 15:08:35 +00:00
umount sbin/umount/umount.8: Amend HISTORY 2016-09-16 04:12:32 +00:00
zfsbootcfg zfsbootcfg: a simple tool to set next boot (one time) options for zfsboot 2016-10-29 14:09:32 +00:00
Makefile zfsbootcfg: a simple tool to set next boot (one time) options for zfsboot 2016-10-29 14:09:32 +00:00
Makefile.amd64
Makefile.arm
Makefile.i386
Makefile.inc Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
Makefile.mips
Makefile.pc98
Makefile.sparc64