patch setup_harddisks

Kristian G. Kvilekval kris at cs.ucsb.edu
Fri May 17 04:53:06 CEST 2002


Small patch allow exactly 3 primaries.
The original failed on my configuration listed below:

disk_config sda
primary  /              200     defaults,errors=remount-ro
primary  /tmp           400
primary  /var           400
logical  swap           1000
logical  /usr           4000
logical  /disks/u1      15000                                   ; reiser
logical  /disks/u2      1-                                      ; reiser




amazon:~# diff -c fai-2.3.4/scripts/setup_harddisks* 
*** fai-2.3.4/scripts/setup_harddisks	Thu May 16 19:48:32 2002
--- fai-2.3.4/scripts/setup_harddisks.orig	Thu May 16 19:47:10 2002
***************
*** 393,400 ****
  		    ($MPPrimary{$extmp} eq "yes") && ($NoMoreLogicals = 1);
  		    $MPPrimary{$mountpoint} = "yes";
  		    $PrimPartNo++;
! #		    ($PrimPartNo == 3) && ($disk =~ /^sd/) && ($PrimPartNo++);
!                     ($PrimPartNo >4 ) && die "ERROR: Too many primary partitions (max 4).";
  		    $MountpointPart{$mountpoint} = PartName($disk,$PrimPartNo);
  		    if($options =~ /\bboot\b/i){
  		        ($BootPartition) && die "ERROR: only one partition can be bootable at a time.";
--- 393,401 ----
  		    ($MPPrimary{$extmp} eq "yes") && ($NoMoreLogicals = 1);
  		    $MPPrimary{$mountpoint} = "yes";
  		    $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} = PartName($disk,$PrimPartNo);
  		    if($options =~ /\bboot\b/i){
  		        ($BootPartition) && die "ERROR: only one partition can be bootable at a time.";
***************
*** 415,421 ****
  			$PrimPartNo++;
  			($PrimPartNo == 3) && ($disk =~ /^sd/) && ($PrimPartNo++);
                          ($PrimPartNo >4 ) 
! 			  && die "ERROR: too many primary partitions (max 4).".
                                 " All logicals together need one primary too.\n";
  			$MountpointPart{$extmp} = PartName($disk,$PrimPartNo);
  			$DiskMountpoints{$disk} .= " $extmp";
--- 416,422 ----
  			$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{$extmp} = PartName($disk,$PrimPartNo);
  			$DiskMountpoints{$disk} .= " $extmp";

-- 
Kristian G. Kvilekval
email:kris at cs.ucsb.edu office:(805)893-4178 http://www.cs.ucsb.edu/~kris



More information about the linux-fai mailing list