diff options
author | Érico Rolim <[email protected]> | 2020-11-13 00:00:59 -0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-11-14 17:21:54 -0800 |
commit | 24c12b48a196265cf1837cd832b420476a208b47 (patch) | |
tree | 09666d56ed528d9acec7b96563ebe33c9912a290 /contrib/dracut/README.dracut.markdown | |
parent | 9c4b6dbb314cabd14746527c0865d98300ea5190 (diff) |
config/dracut/90zfs: handle cases where hostid(1) returns all zeros
On systems with musl libc, hostid(1) always prints "00000000", which
will cause improper behavior when the 90zfs module is configured in a
dracut initramfs. Work around this by copying the host /etc/hostid if
the file exists, and otherwise only write /etc/hostid if hostid(1)
returns something meaningful. This avoids zgenhostid creating a random
/etc/hostid for the initramfs, which could lead to errors when trying to
import the pool if spl_hostid isn't defined in the kernel command line.
Furthermore, tag the /etc/hostid file as hostonly, since it is system
specific and shouldn't be taken into account when trying to use an
initramfs generated in one system to boot into a different system.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Georgy Yakovlev <[email protected]>
Co-authored-by: Andrew J. Hesford <[email protected]>
Signed-off-by: Érico Rolim <[email protected]>
Closes #11174
Closes #11189
Diffstat (limited to 'contrib/dracut/README.dracut.markdown')
0 files changed, 0 insertions, 0 deletions