FAI failure...

Ian Colquhoun ian.colquhoun at sheridanc.on.ca
Thu Oct 25 19:18:44 CEST 2001


Hi All,

I figured out a way around this problem thanks to the suggestions. The
suggestion from Jens to change the sfdisk flag from -l to -g actually
caused a division by zero error in the setup_harddisks script so I
wrote my own patch to setup_harddisks. Hope it might help others.

Ian.


--- /usr/lib/fai/sbin/setup_harddisks.orig	Thu Oct 25 12:28:17 2001
+++ /usr/lib/fai/sbin/setup_harddisks	Thu Oct 25 12:01:19 2001
@@ -218,6 +218,19 @@
 #****************************************************
 sub GetAllDisks{
     my $line=""; my $disk=""; my $device=""; my $rest; my $result; my $divi;
+
+    # ensure that the disk has a somewhat valid partition structure
+    $result = `sh -c "LC_ALL=C sfdisk -d -q"`;
+    foreach $line(split(/\n/,$result)){
+        if ($line =~ /\s*\/dev\/(.+):\s*unrecognized.*/){
+            $disk = $1;
+	    print "running bootsector -e on /dev/$disk\n";
+            my $output="";
+            $output = `bootsector -e /dev/$disk`;
+            print "$output\n";
+        }
+    }
+
     print "disks found:";
     $result = `sh -c "LC_ALL=C sfdisk -l -q"`;
     foreach $line(split(/\n/,$result)){



More information about the linux-fai mailing list