Can't setup a SCSI hard disk with three primary partitions

Pedro Guerreiro pmguerre at ualg.pt
Mon Jun 12 16:42:17 CEST 2000


Hi.

While setting up a SCSI harddisk, I came across one problem: Why can't I
set up three (3) primary partitions, plus any other number of logical
ones?

Searching through setup_harddisks I found the following line:

   ($PrimPartNo == 3) && ($disk =~ /^sd/) && ($PrimPartNo++);

Is there anything wrong with a SCSI harddisk having three primary
partitions? Appling the following patch solves the problem (I think):

--- cut ---

--- /usr/lib/fai/sbin/setup_harddisks	Wed May  3 08:41:56 2000
+++ /usr/lib/fai/nfsroot/sbin/setup_harddisks	Fri Jun  9 23:11:17 2000
@@ -408,7 +408,7 @@
 		    ($MPPrimary{$extmp} eq "yes") && ($NoMoreLogicals = 1);
 		    $MPPrimary{$mountpoint} = "yes";
 		    $PrimPartNo++;
-		    ($PrimPartNo == 3) && ($disk =~ /^sd/) && ($PrimPartNo++);
+		    #($PrimPartNo == 3) && ($disk =~ /^sd/) && ($PrimPartNo++);
                     ($PrimPartNo >4 ) && die "ERROR: Too much primary partitions (max 4).".
                                 " All logicals together need one primary too.\n";
 		    $MountpointPart{$mountpoint} = "$disk$PrimPartNo";
@@ -429,7 +429,7 @@
 			$MPMaxSize{$extmp} = 0;
 			$MPID{$extmp} = 5;
 			$PrimPartNo++;
-			($PrimPartNo == 3) && ($disk =~ /^sd/) && ($PrimPartNo++);
+			#($PrimPartNo == 3) && ($disk =~ /^sd/) && ($PrimPartNo++);
                         ($PrimPartNo >4 ) 
 			  && die "ERROR: too much primary partitions (max 4).".
                                " All logicals together need one primary too.\n";
@@ -438,6 +438,7 @@
 		    }
 		    ($options =~ /\bboot\b/i) && die "ERROR: line $a, only primary partitions can be bootable.\n";
 		}
+print $command, "\t", $PrimPartNo, "\t", $LogPartNo, "\n";
       		($DiskMountpoint{$disk} =~ /\b$mountpoint\b/)
 		    && die "ERROR in config file line $a, Mountpoint redefined: $mountpoint\n$line\n";
 		$DiskMountpoints{$disk} .= " $mountpoint";

--- cut ---

Thanks.
Pedro Guerreiro




More information about the linux-fai mailing list