project-trident / trident-core

Core Packages and system overlay files
http://project-trident.org
BSD 2-Clause "Simplified" License
33 stars 10 forks source link

Dracut Error Message at Boot about hostid doesn't prevent boot up #106

Open michaelmrose opened 3 years ago

michaelmrose commented 3 years ago

[ 0.513135] dracut Warning: ZFS: No hostid found on kernel command line or /etc/hostid. [ 0.513205] dracut Warning: ZFS: Pools may not import correctly.

Looking at https://fossies.org/linux/zfs/contrib/dracut/90zfs/parse-zfs.sh.in

It looks like it does something like this

 /lib/dracut-lib.sh
    4 
    5 # Let the command line override our host id.
    6 spl_hostid=$(getarg spl_hostid=)
    7 if [ -n "${spl_hostid}" ] ; then
    8     info "ZFS: Using hostid from command line: ${spl_hostid}"
    9     zgenhostid -f "${spl_hostid}"
   10 elif [ -f "/etc/hostid" ] ; then
   11     info "ZFS: Using hostid from /etc/hostid: $(hostid)"
   12 else
   13     warn "ZFS: No hostid found on kernel command line or /etc/hostid."
   14     warn "ZFS: Pools may not import correctly."
   15 fi

I would imagine /etc/hostid which does exist wouldn't be available before pools are imported so it would have to be provided by the kerenl command line I think?

michaelmrose commented 3 years ago

So /boot/efi/ is the fat EFI partition. in /boot/efi/EFI/void is the initial initramfs, which according to lsinitrd doesn't contain /etc/hostid which is why this message shows up.

michaelmrose commented 3 years ago

Additionally I get another dracut error message that says dracut/modules.d/90zfs/parse-zfs.sh no such file

parse-zfs also contains text from the above dracut-lib.sh and is probably the actual script echoing the above error at startup