From 9052e3d70bacdbcc51cbef8b7f0566b49d2f736b Mon Sep 17 00:00:00 2001 From: gregory-lee-bartholomew Date: Fri, 29 May 2020 23:16:08 -0500 Subject: Add bootfs.snapshot and bootfs.rollback kernel parameters Unlike other filesystems, snapshots and rollbacks of bootfs need to be done from a rescue environment. This patch makes it possible to snap- shot or rollback the bootfs simply by specifying bootfs.snapshot or bootfs.rollback on the kernel command line. The operation will be performed by dracut just before bootfs is mounted. Reviewed-by: Antonio Russo Reviewed-by: Brian Behlendorf Signed-off-by: Gregory Bartholomew Closes #10198 --- contrib/dracut/90zfs/Makefile.am | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'contrib/dracut/90zfs/Makefile.am') diff --git a/contrib/dracut/90zfs/Makefile.am b/contrib/dracut/90zfs/Makefile.am index 1680230fa..08667a134 100644 --- a/contrib/dracut/90zfs/Makefile.am +++ b/contrib/dracut/90zfs/Makefile.am @@ -10,7 +10,9 @@ pkgdracut_SCRIPTS = \ zfs-lib.sh pkgdracut_DATA = \ - zfs-env-bootfs.service + zfs-env-bootfs.service \ + zfs-snapshot-bootfs.service \ + zfs-rollback-bootfs.service EXTRA_DIST = \ $(top_srcdir)/contrib/dracut/90zfs/export-zfs.sh.in \ @@ -21,7 +23,9 @@ EXTRA_DIST = \ $(top_srcdir)/contrib/dracut/90zfs/zfs-load-key.sh.in \ $(top_srcdir)/contrib/dracut/90zfs/zfs-needshutdown.sh.in \ $(top_srcdir)/contrib/dracut/90zfs/zfs-lib.sh.in \ - $(top_srcdir)/contrib/dracut/90zfs/zfs-env-bootfs.service.in + $(top_srcdir)/contrib/dracut/90zfs/zfs-env-bootfs.service.in \ + $(top_srcdir)/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in \ + $(top_srcdir)/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in $(pkgdracut_SCRIPTS) $(pkgdracut_DATA) :%:%.in -$(SED) -e 's,@bindir\@,$(bindir),g' \ -- cgit v1.2.3