From aaebb1b66ed84a14a7dcbd070afab3c5334880ac Mon Sep 17 00:00:00 2001 From: Iacopo Isimbaldi Date: Mon, 11 Jan 2016 23:14:23 +0100 Subject: Updated zfs.install and hook Dropped "mkinitcpio-dkms" dep, replaced by zfs hook --- zfs.initcpio.install | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 zfs.initcpio.install (limited to 'zfs.initcpio.install') diff --git a/zfs.initcpio.install b/zfs.initcpio.install new file mode 100644 index 0000000..e192c3b --- /dev/null +++ b/zfs.initcpio.install @@ -0,0 +1,110 @@ +#!/bin/bash + +build() { + echo -en "Build spl module for ${KERNELVERSION} kernel... " + $(which dkms) install -m spl -v ##VERMARKER## -k ${KERNELVERSION} -q + echo -en "Done.\nBuild zfs module for ${KERNELVERSION} kernel... " + $(which dkms) install -m zfs -v ##VERMARKER## -k ${KERNELVERSION} -q + echo "Done." + + map add_module \ + zavl \ + znvpair \ + zunicode \ + zcommon \ + zfs \ + zpios \ + spl \ + splat \ + zlib_deflate + + map add_binary \ + arcstat.py \ + dbufstat.py \ + fsck.zfs \ + mount.zfs \ + zdb \ + zed \ + zfs \ + zhack \ + zinject \ + zpios \ + zpool \ + zstreamdump \ + ztest \ + splat \ + hostid \ + /lib/udev/vdev_id \ + /lib/udev/zvol_id + + map add_file \ + /lib/udev/rules.d/60-zvol.rules \ + /lib/udev/rules.d/69-vdev.rules \ + /lib/udev/rules.d/90-zfs.rules + + map add_dir \ + /etc/zfs/zed.d + + add_runscript + + # allow mount(8) to "autodetect" ZFS + echo 'zfs' >>"$BUILDROOT/etc/filesystems" + + [[ -f /etc/zfs/zpool.cache ]] && add_file "/etc/zfs/zpool.cache" + [[ -f /etc/modprobe.d/zfs.conf ]] && add_file "/etc/modprobe.d/zfs.conf" + [[ -f /etc/hostid ]] && add_file "/etc/hostid" +} + +help() { + cat< + + To force importing of a ZFS pool: + + zfs_force=1 + + If set to 1, this will use "zpool import -f" when attempting to import + pools. + + To search for devices in a directory other than "/dev": + + zfs_import_dir=/dev/disk/by-uuid + or + zfs_import_dir=/dev/disk/by-partuuid + or + zfs_import_dir=/dev/disk/by-path + etc. + + Following initcpio convention, the 'rw' option must be specified to load the + pool as read/write. Pools are loaded as read only by default. + +Examples: + + To use bootfs on your pool, use + + zfs=bootfs rw + + This will setup your root using tank/root zfs pool. + + zfs=tank/root rw + +If you want to set properties for zfs-on-linux module, you should add them to +/etc/modprobe.d/zfs.conf and then rebuild initcpio. + +HELPEOF +} + +# vim: set ts=4 sw=4 ft=sh et: -- cgit v1.2.1