/etc/hostid is used by ZFS (spl.ko) to determine which host last imported a
pool creating and importing a pool with one hostid during install and booting
with a different one (or none) leads to the system refusing to import the pool
see spl-module-parameters(5) and zpool(8).
by copying the /etc/hostid from the installer into the target system we ensure
that it stays consistent
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
die "unable to create a new machine-id\n" if ! $machine_id;
write_config($machine_id, "$targetdir/etc/machine-id");
+ syscmd("cp /etc/hostid $targetdir/etc/") == 0 ||
+ die "unable to copy hostid\n";
+
syscmd("touch $targetdir/proxmox_install_mode");
my $grub_install_devices_txt = '';