next if $part eq $disk;
next if $part !~ /^\Q$disk\E/;
eval { syscmd("pvremove -ff -y $part"); };
+ eval { syscmd("zpool labelclear -f $part"); };
eval { syscmd("dd if=/dev/zero of=$part bs=1M count=16"); };
}
};
die "unable to install systemd-boot loader\n";
write_config("timeout 3\ndefault proxmox-*\n",
"$targetdir/$espmp/loader/loader.conf");
- syscmd("chroot $targetdir /etc/kernel/postinst.d/zz-pve-efiboot") == 0 ||
- die "unable to generate systemd-boot config\n";
syscmd("umount $targetdir/$espmp") == 0 ||
die "unable to umount ESP $targetdir/$espmp\n";
my $devname = $di->{devname};
$di->{by_id} = find_stable_path ("/dev/disk/by-id", $devname);
- # Note: using /dev/disk/by-id/ does not work for unknown reason, we get
- # cannot create 'rpool': no such pool or dataset
- #my $osdev = find_stable_path ("/dev/disk/by-id", $di->{osdev}) || $di->{osdev};
+ my $osdev = find_stable_path ("/dev/disk/by-id", $di->{osdev}) || $di->{osdev};
- my $osdev = $di->{osdev};
$vdev =~ s/ $devname/ $osdev/;
}
syscmd("chroot $targetdir /usr/sbin/update-grub") == 0 ||
die "unable to update boot loader config\n";
+ if ($use_zfs && $boot_type eq 'efi') {
+ syscmd("chroot $targetdir /etc/kernel/postinst.d/zz-pve-efiboot") == 0 ||
+ die "unable to generate systemd-boot config\n";
+ }
+
syscmd("umount $targetdir/dev");
}
eval {
my $cpuinfo = file_get_contents('/proc/cpuinfo');
if ($cpuinfo && !($cpuinfo =~ /^flags\s*:.*(vmx|svm)/m)) {
- display_error("No support for KVM virtualisation detected.\n\n" .
+ display_error("No support for KVM virtualization detected.\n\n" .
"Check BIOS settings for Intel VT / AMD-V / SVM.")
}
};