Use datadir not datarootdir for dracut
[zfs.git] / dracut / README.dracut.markdown
1 How to setup a zfs root filesystem using dracut
2 -----------------------------------------------
3
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.
7
8 2) Set the bootfs property for the bootable dataset in the pool.  Then set
9 the dataset mountpoint property to '/'.
10
11     $ zpool set bootfs=pool/dataset
12     $ zfs set mountpoint=/ pool/dataset
13
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'.
17
18     $ grub.conf/menu.lst: kernel ... root=ZFS=pool/dataset
19     $ zfs set mountpoint=legacy pool/dataset
20
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.
25
26 4) Finally, create your new initramfs by running dracut.
27
28     $ dracut --force /path/to/initramfs kernel_version