diff options
author | Jan Houben | 2017-07-11 03:51:30 +0200 |
---|---|---|
committer | Jan Houben | 2017-07-11 03:51:30 +0200 |
commit | a14f9a61443eceaeec797cf8fd772bfbbdc0e36a (patch) | |
tree | 6773dd378a2cb5ad997d5cdca555701c5113ef9a /plymouth-zfs.initcpio.install | |
download | aur-a14f9a61443eceaeec797cf8fd772bfbbdc0e36a.tar.gz |
first commit
Diffstat (limited to 'plymouth-zfs.initcpio.install')
-rw-r--r-- | plymouth-zfs.initcpio.install | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/plymouth-zfs.initcpio.install b/plymouth-zfs.initcpio.install new file mode 100644 index 000000000000..810d5c92e8fb --- /dev/null +++ b/plymouth-zfs.initcpio.install @@ -0,0 +1,117 @@ +#!/bin/bash + +build() { + + # zfs + map add_module \ + zavl \ + znvpair \ + zunicode \ + zcommon \ + zfs \ + zpios \ + spl \ + splat + + map add_binary \ + arcstat.py \ + dbufstat.py \ + fsck.zfs \ + mount.zfs \ + seq \ + zdb \ + zed \ + zfs \ + zhack \ + zinject \ + zpios \ + zpool \ + zstreamdump \ + ztest \ + splat \ + /lib/udev/vdev_id \ + /lib/udev/zvol_id \ + findmnt + + map add_file \ + /lib/udev/rules.d/60-zvol.rules \ + /lib/udev/rules.d/69-vdev.rules \ + /lib/udev/rules.d/90-zfs.rules \ + /lib/libgcc_s.so.1 + + map add_dir \ + /etc/zfs/zed.d + + # add plymouth prompt support + add_binary "/usr/lib/plymouth/label.so" + add_binary "/usr/lib/plymouth/text.so" + add_file "/usr/share/fonts/TTF/DejaVuSans.ttf" + add_file "/etc/fonts/fonts.conf" + add_file "/etc/fonts/conf.d/60-latin.conf" + + 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" +} + +help() { + cat<<HELPEOF +This hook allows you to use ZFS as your root filesystem. + +Command Line Setup: + + You can append the following arguments to your kernel parameters list. See + https://wiki.archlinux.org/index.php/Kernel_parameters for more information. + + To use ZFS as your boot filesystem: + + zfs=bootfs or zfs=auto or root=zfs + + To use a pool or dataset: + + zfs=<pool/dataset> + + 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 change the seconds of time to wait for ZFS devices to show up at boot: + + zfs_wait=30 + + 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: |