Hello,

when using "preserve_reinstall" a machine cannot be installed [with 
initial-flag] if there isn't a partition layout on the disk (i.e. the disk is 
empty).

The attached patch tries to work around this behaviour.

It would be kind of you to include this patch (or something similar).

Best regards,
Manuel Hachtkemper
--- Volumes.pm.orig	2014-01-16 15:16:41.831802623 +0100
+++ Volumes.pm	2014-01-16 15:18:02.688197838 +0100
@@ -113,7 +113,7 @@
     if (!defined($FAI::configs{"PHY_$disk"}) && $error ne "") {
       warn "Could not determine size and contents of $disk, skipping\n";
       next;
-    } elsif (defined($FAI::configs{"PHY_$disk"}) &&
+    } elsif (!defined($ENV{flag_initial}) && defined($FAI::configs{"PHY_$disk"}) &&
       $FAI::configs{"PHY_$disk"}{preserveparts} == 1 && $error ne "") {
       die "Failed to determine size and contents of $disk, but partitions should have been preserved\n";
     }

Reply via email to