From 20ed050509b2d5e525f1c8afa6ef508aa759ba14 Mon Sep 17 00:00:00 2001 From: Alireza Karami Date: Mon, 6 Oct 2025 19:24:39 +0200 Subject: [PATCH] moving zgenhostid up - before dracut we need to generate hostid before creating initramfs image, otherwise, you may receive the following warning when importing your pool as root: ``` $ sudo zpool status pool: rpool state: ONLINE status: Mismatch between pool hostid and system hostid on imported pool. This pool was previously imported into a system with a different hostid, and then was verbatim imported into this system. action: Export this pool on all systems on which it is imported. Then import it to correct the mismatch. see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-EY config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 sda3 ONLINE 0 0 0 errors: No known data errors ``` --- docs/Getting Started/RHEL-based distro/Root on ZFS.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/Getting Started/RHEL-based distro/Root on ZFS.rst b/docs/Getting Started/RHEL-based distro/Root on ZFS.rst index 8e194ffa1..6571d91ee 100644 --- a/docs/Getting Started/RHEL-based distro/Root on ZFS.rst +++ b/docs/Getting Started/RHEL-based distro/Root on ZFS.rst @@ -411,6 +411,10 @@ System Configuration echo 'filesystems+=" virtio_blk "' >> /etc/dracut.conf.d/zfs.conf fi +#. Generate host id:: + + zgenhostid -f -o /etc/hostid + #. Build initrd:: find -D exec /lib/modules -maxdepth 1 \ @@ -425,10 +429,6 @@ System Configuration fixfiles -F onboot -#. Generate host id:: - - zgenhostid -f -o /etc/hostid - #. Install locale package, example for English locale:: dnf install -y glibc-minimal-langpack glibc-langpack-en