freebsd-dev/dracut
Brian Behlendorf 8a7e1ceefa Check for -Wno-unused-but-set-variable gcc support
Gcc versions 4.3.2 and earlier do not support the compiler flag
-Wno-unused-but-set-variable.  This can lead to build failures
on older Linux platforms such as Debian Lenny.  Since this is
an optional build argument this changes add a new autoconf check
for the option.  If it is supported by the installed version of
gcc then it is used otherwise it is omited.

See commit's 12c1acde76 and
79713039a2 for the reason the
-Wno-unused-but-set-variable options was originally added.
2011-06-14 14:43:22 -07:00
..
90zfs Check for -Wno-unused-but-set-variable gcc support 2011-06-14 14:43:22 -07:00
Makefile.am Add dracut support 2011-03-17 16:52:04 -07:00
Makefile.in Check for -Wno-unused-but-set-variable gcc support 2011-06-14 14:43:22 -07:00
README.dracut.markdown Add dracut support 2011-03-17 16:52:04 -07:00

How to setup a zfs root filesystem using dracut

  1. Install the zfs-dracut package. This package adds a zfs dracut module to the /usr/share/dracut/modules.d/ directory which allows dracut to create an initramfs which is zfs aware.

  2. Set the bootfs property for the bootable dataset in the pool. Then set the dataset mountpoint property to '/'.

    $ zpool set bootfs=pool/dataset $ zfs set mountpoint=/ pool/dataset

Alternately, legacy mountpoints can be used by setting the 'root=' option on the kernel line of your grub.conf/menu.lst configuration file. Then set the dataset mountpoint property to 'legacy'.

$ grub.conf/menu.lst: kernel ... root=ZFS=pool/dataset
$ zfs set mountpoint=legacy pool/dataset
  1. To set zfs module options put them in /etc/modprobe.d/zfs.conf file. The complete list of zfs module options is available by running the modinfo zfs command. Commonly set options include: zfs_arc_min, zfs_arc_max, zfs_prefetch_disable, and zfs_vdev_max_pending.

  2. Finally, create your new initramfs by running dracut.

    $ dracut --force /path/to/initramfs kernel_version