[Fai-commit] r5381 - people/michael/experimental/patches

Michael Tautschnig mt at alioth.debian.org
Tue Apr 28 11:56:02 UTC 2009


Author: mt
Date: 2009-04-28 11:56:01 +0000 (Tue, 28 Apr 2009)
New Revision: 5381

Modified:
   people/michael/experimental/patches/setup-storage_gpt-bios
Log:
Improved patch for GPT-BIOS stuff


Modified: people/michael/experimental/patches/setup-storage_gpt-bios
===================================================================
--- people/michael/experimental/patches/setup-storage_gpt-bios	2009-04-28 11:01:03 UTC (rev 5380)
+++ people/michael/experimental/patches/setup-storage_gpt-bios	2009-04-28 11:56:01 UTC (rev 5381)
@@ -116,7 +116,7 @@
        $next_start = 34 * $current_disk->{sector_size};
  
        # modify the disk to claim the space for the second partition table
-@@ -640,6 +641,28 @@
+@@ -640,6 +641,35 @@
  
        # the space required by the GPTs
        $min_req_total_space += 2 * 34 * $current_disk->{sector_size};
@@ -130,6 +130,13 @@
 +      $min_req_total_space += $current_disk->{bios_sectors_per_track} *
 +        $current_disk->{sector_size};
 +
++      # apparently parted insists in having some space left at the end too
++      # modify the disk to claim the space for the second partition table
++      $current_disk->{end_byte} -= 34 * $current_disk->{sector_size};
++
++      # the space required by the GPTs
++      $min_req_total_space += 34 * $current_disk->{sector_size};
++
 +      # on gpt-bios we'll need an additional partition to store what doesn't fit
 +      # in the MBR
 +      $FAI::device = $config;
@@ -145,7 +152,7 @@
      }
  
      # the list of partitions that we need to find start and end bytes for
-@@ -690,7 +713,7 @@
+@@ -690,7 +720,7 @@
  
          # msdos does not support partitions larger than 2TB
          ($part->{size}->{eff_size} > (&FAI::convert_unit("2TB") * 1024.0 *




More information about the Fai-commit mailing list