diff options
author | Toomas Soome <tsoome@FreeBSD.org> | 2020-09-21 09:01:10 +0000 |
---|---|---|
committer | Toomas Soome <tsoome@FreeBSD.org> | 2020-09-21 09:01:10 +0000 |
commit | e307eb94ae520d98dc1d346a0c53667a41beab5d (patch) | |
tree | 388cef449cfe2f57e0f2c494db23b11a1390072f /share/mk/src.libnames.mk | |
parent | 7d54cc9165a3990849b60835c85ddb388905e1b7 (diff) | |
download | src-e307eb94ae520d98dc1d346a0c53667a41beab5d.tar.gz src-e307eb94ae520d98dc1d346a0c53667a41beab5d.zip |
loader: zfs should support bootonce an nextboot
bootonce feature is temporary, one time boot, activated by
"bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag.
By default, the bootonce setting is reset on attempt to boot and the next
boot will use previously active BE.
By setting zfs_bootonce_activate="YES" in rc.conf, the bootonce BE will
be set permanently active.
bootonce dataset name is recorded in boot pool labels, bootenv area.
in case of nextboot, the nextboot_enable boolean variable is recorded in
freebsd:nvstore nvlist, also stored in boot pool label bootenv area.
On boot, the loader will process /boot/nextboot.conf if nextboot_enable
is "YES", and will set nextboot_enable to "NO", preventing /boot/nextboot.conf
processing on next boot.
bootonce and nextboot features are usable in both UEFI and BIOS boot.
To use bootonce/nextboot features, the boot loader needs to be updated on disk;
if loader.efi is stored on ESP, then ESP needs to be updated and
for BIOS boot, stage2 (zfsboot or gptzfsboot) needs to be updated
(gpart or other tools).
At this time, only lua loader is updated.
Sponsored by: Netflix, Klara Inc.
Differential Revision: https://reviews.freebsd.org/D25512
Notes
Notes:
svn path=/head/; revision=365938
Diffstat (limited to 'share/mk/src.libnames.mk')
-rw-r--r-- | share/mk/src.libnames.mk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 8a7768a8318c..612cd6604025 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -202,6 +202,7 @@ _LIBRARIES= \ z \ zfs_core \ zfs \ + zfsbootenv \ zpool \ zutil @@ -385,10 +386,11 @@ _DP_tpool= spl _DP_uutil= avl spl _DP_zfs= md pthread umem util uutil m avl bsdxml crypto geom nvpair \ z zfs_core zutil +_DP_zfsbootenv= zfs nvpair _DP_zfs_core= nvpair _DP_zpool= md pthread z icp spl nvpair avl umem _DP_zutil= avl tpool -_DP_be= zfs spl nvpair +_DP_be= zfs spl nvpair zfsbootenv _DP_netmap= _DP_ifconfig= m @@ -600,6 +602,7 @@ LIBUMEMDIR= ${OBJTOP}/cddl/lib/libumem LIBUUTILDIR= ${OBJTOP}/cddl/lib/libuutil LIBZFSDIR= ${OBJTOP}/cddl/lib/libzfs LIBZFS_COREDIR= ${OBJTOP}/cddl/lib/libzfs_core +LIBZFSBOOTENVDIR= ${OBJTOP}/cddl/lib/libzfsbootenv LIBZPOOLDIR= ${OBJTOP}/cddl/lib/libzpool LIBZUTILDIR= ${OBJTOP}/cddl/lib/libzutil LIBTPOOLDIR= ${OBJTOP}/cddl/lib/libtpool |