diff --git a/docs/Getting Started/Fedora/Root on ZFS/3-system-configuration.rst b/docs/Getting Started/Fedora/Root on ZFS/3-system-configuration.rst index e150de7..d8f1be3 100644 --- a/docs/Getting Started/Fedora/Root on ZFS/3-system-configuration.rst +++ b/docs/Getting Started/Fedora/Root on ZFS/3-system-configuration.rst @@ -101,7 +101,7 @@ System Configuration #. Build ZFS modules:: - ls -1 /lib/modules \ - | while read kernel_version; do + for directory in /lib/modules/*; do + kernel_version=$(basename $directory) dkms autoinstall -k $kernel_version - done + done diff --git a/docs/Getting Started/Fedora/Root on ZFS/5-bootloader.rst b/docs/Getting Started/Fedora/Root on ZFS/5-bootloader.rst index 6ce4290..9cef85c 100644 --- a/docs/Getting Started/Fedora/Root on ZFS/5-bootloader.rst +++ b/docs/Getting Started/Fedora/Root on ZFS/5-bootloader.rst @@ -49,10 +49,10 @@ Install GRUB touch /etc/zfs/zpool.cache chmod a-w /etc/zfs/zpool.cache chattr +i /etc/zfs/zpool.cache - ls -1 /lib/modules \ - | while read kernel_version; do + for directory in /lib/modules/*; do + kernel_version=$(basename $directory) dracut --force --kver $kernel_version - done + done #. Disable BLS:: diff --git a/docs/Getting Started/Fedora/index.rst b/docs/Getting Started/Fedora/index.rst index 802da33..31610f2 100644 --- a/docs/Getting Started/Fedora/index.rst +++ b/docs/Getting Started/Fedora/index.rst @@ -49,13 +49,16 @@ see below. modprobe zfs - It might be necessary to rebuild module:: + It might be necessary to rebuild ZFS module:: - ls -1 /lib/modules \ - | while read kernel_version; do + for directory in /lib/modules/*; do + kernel_version=$(basename $directory) dkms autoinstall -k $kernel_version done + If for some reason, ZFS kernel module is not successfully built, + you can also run the above command to debug the problem. + #. By default ZFS kernel modules are loaded upon detecting a pool. To always load the modules at boot:: diff --git a/docs/Getting Started/RHEL-based distro/RHEL 8-based distro Root on ZFS/3-system-configuration.rst b/docs/Getting Started/RHEL-based distro/RHEL 8-based distro Root on ZFS/3-system-configuration.rst index 6357e8c..f2e04bd 100644 --- a/docs/Getting Started/RHEL-based distro/RHEL 8-based distro Root on ZFS/3-system-configuration.rst +++ b/docs/Getting Started/RHEL-based distro/RHEL 8-based distro Root on ZFS/3-system-configuration.rst @@ -97,7 +97,7 @@ System Configuration #. Build ZFS modules:: - ls -1 /lib/modules \ - | while read kernel_version; do + for directory in /lib/modules/*; do + kernel_version=$(basename $directory) dkms autoinstall -k $kernel_version - done + done diff --git a/docs/Getting Started/RHEL-based distro/RHEL 8-based distro Root on ZFS/5-bootloader.rst b/docs/Getting Started/RHEL-based distro/RHEL 8-based distro Root on ZFS/5-bootloader.rst index 2e29dbf..df01d59 100644 --- a/docs/Getting Started/RHEL-based distro/RHEL 8-based distro Root on ZFS/5-bootloader.rst +++ b/docs/Getting Started/RHEL-based distro/RHEL 8-based distro Root on ZFS/5-bootloader.rst @@ -49,10 +49,10 @@ Install GRUB touch /etc/zfs/zpool.cache chmod a-w /etc/zfs/zpool.cache chattr +i /etc/zfs/zpool.cache - ls -1 /lib/modules \ - | while read kernel_version; do + for directory in /lib/modules/*; do + kernel_version=$(basename $directory) dracut --force --kver $kernel_version - done + done #. Load ZFS modules and disable BLS:: diff --git a/docs/Getting Started/RHEL-based distro/index.rst b/docs/Getting Started/RHEL-based distro/index.rst index a3ebae0..dc08da5 100644 --- a/docs/Getting Started/RHEL-based distro/index.rst +++ b/docs/Getting Started/RHEL-based distro/index.rst @@ -109,6 +109,16 @@ time you must create an ``/etc/modules-load.d/zfs.conf`` file:: After upgrading users must uninstall OpenZFS and then reinstall it from the matching repository as described in this section. +It might be necessary to rebuild ZFS module:: + + for directory in /lib/modules/*; do + kernel_version=$(basename $directory) + dkms autoinstall -k $kernel_version + done + +If for some reason, ZFS kernel module is not successfully built, +you can also run the above command to debug the problem. + Testing Repositories --------------------