aboutsummaryrefslogtreecommitdiffstats
path: root/rpm/generic
diff options
context:
space:
mode:
authorTurbo Fredriksson <[email protected]>2014-01-30 16:26:48 +0000
committerBrian Behlendorf <[email protected]>2015-07-08 18:14:34 -0700
commit2cac7f5f11756663525a5d4604d9f0a3202d4024 (patch)
tree855c933fc6a82ddd57901990bffa57ca90935592 /rpm/generic
parent1cd777340bb2feaedbbdb48cab27ce5ffa14c353 (diff)
Initramfs scripts for ZoL.
* Supports booting of a ZFS snapshot. Do this by cloning the snapshot into a dataset. If this, the resulting dataset, already exists, destroy it. Then mount it on root. * If snapshot does not exist, use base dataset (the part before '@') as boot filesystem instead. * If no snapshot is specified on the 'root=' kernel command line, but there is an '@', then get a list of snapshots below that filesystem and ask the user which to use. * Clone with 'mountpoint=none' and 'canmount=noauto' - we mount manually and explicitly. * For sub-filesystems, that doesn't have a mountpoint property set, we use the 'org.zol:mountpoint' to keep track of it's mountpoint. * Allow rollback of snapshots instead of clone it and boot from the clone. * Allow mounting a root- and subfs with mountpoint=legacy set * Allow mounting a filesystem which is using nativ encryption. * Support all currently used kernel command line arguments All the different distributions have their own standard on what to specify on the kernel command line to boot of a ZFS filesystem. * Extra options: * zfsdebug=(on,yes,1) Show extra debugging information * zfsforce=(on,yes,1) Force import the pool * rollback=(on,yes,1) Rollback (instead of clone) the snapshot * Only try to import pool if it haven't already been imported * This will negate the need to force import a pool that have not been exported cleanly. * Support exclusion of pools to import by setting ZFS_POOL_EXCEPTIONS in /etc/default/zfs. * Support additional configuration variable ZFS_INITRD_ADDITIONAL_DATASETS to mount additional filesystems not located under your root dataset. * Include /etc/modprobe.d/{zfs,spl}.conf in the initrd if it/they exist. * Include the udev rule to use by-vdev for pool imports. * Include the /etc/default/zfs file to the initrd. * Only try /dev/disk/by-* in the initrd if USE_DISK_BY_ID is set. * Use /dev/disk/by-vdev before anything. * Add /dev as a last ditch attempt. * Fallback to using the cache file if that exist if nothing else worked. * Use /sbin/modprobe instead of built-in (BusyBox) modprobe. This gets rid of the message "modprobe: can't load module zcommon". Thanx to pcoultha for finding this. Signed-off-by: Turbo Fredriksson <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2116 Closes #2114
Diffstat (limited to 'rpm/generic')
-rw-r--r--rpm/generic/zfs.spec.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in
index 04b0033f6..50b61f010 100644
--- a/rpm/generic/zfs.spec.in
+++ b/rpm/generic/zfs.spec.in
@@ -189,6 +189,19 @@ Requires: dracut
This package contains a dracut module used to construct an initramfs
image which is ZFS aware.
+%if 0%{?_initramfs}
+%package initramfs
+Summary: Initramfs module
+Group: System Environment/Kernel
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
+Requires: initramfs-tools
+
+%description initramfs
+This package contains a initramfs module used to construct an initramfs
+image which is ZFS aware.
+%endif
+
%prep
%if %{with debug}
%define debug --enable-debug
@@ -303,6 +316,16 @@ exit 0
%doc dracut/README.dracut.markdown
%{_dracutdir}/modules.d/*
+%if 0%{?_initramfs}
+%files initramfs
+%doc contrib/initramfs/README.initramfs.markdown
+/usr/share/initramfs-tools/*
+%else
+# Since we're not building the initramfs package,
+# ignore those files.
+%exclude /usr/share/initramfs-tools
+%endif
+
%changelog
* Wed Apr 8 2015 Brian Behlendorf <[email protected]> - 0.6.4-1
- Released 0.6.4-1