1 How to setup a zfs root filesystem using dracut
2 -----------------------------------------------
4 1) Install the zfs-dracut package. This package adds a zfs dracut module
5 to the /usr/share/dracut/modules.d/ directory which allows dracut to
6 create an initramfs which is zfs aware.
8 2) Set the bootfs property for the bootable dataset in the pool. Then set
9 the dataset mountpoint property to '/'.
11 $ zpool set bootfs=pool/dataset
12 $ zfs set mountpoint=/ pool/dataset
14 Alternately, legacy mountpoints can be used by setting the 'root=' option
15 on the kernel line of your grub.conf/menu.lst configuration file. Then
16 set the dataset mountpoint property to 'legacy'.
18 $ grub.conf/menu.lst: kernel ... root=ZFS=pool/dataset
19 $ zfs set mountpoint=legacy pool/dataset
21 3) To set zfs module options put them in /etc/modprobe.d/zfs.conf file.
22 The complete list of zfs module options is available by running the
23 _modinfo zfs_ command. Commonly set options include: zfs_arc_min,
24 zfs_arc_max, zfs_prefetch_disable, and zfs_vdev_max_pending.
26 4) Finally, create your new initramfs by running dracut.
28 $ dracut --force /path/to/initramfs kernel_version