Index: fai-4.0.6/lib/setup-storage/Commands.pm
===================================================================
--- fai-4.0.6.orig/lib/setup-storage/Commands.pm 2013-05-31 12:20:14.890781176 +0200
+++ fai-4.0.6/lib/setup-storage/Commands.pm 2013-05-31 12:21:12.664935548 +0200
@@ -225,6 +225,21 @@
my $pre_dep = "exist_$real_dev";
+ # if the disk is a physical device, with a boot partition and we are
+ # using gpt, then we need to add a dependency on gpt_bios_fake_bootable
+ my ($i_p_d, $disk, $part_no) = &FAI::phys_dev($real_dev);
+ if ($i_p_d && $FAI::configs{"PHY_$disk"}{disklabel} eq "gpt-bios") {
+ foreach my $part_id (&numsort(keys %{ $FAI::configs{"PHY_$disk"}{partitions} })) {
+ # reference to the current partition
+ my $part = (\%FAI::configs)->{"PHY_$disk"}->{partitions}->{$part_id};
+ # if /boot exists, set $boot_disk
+ if ($part->{mountpoint} eq "/boot") {
+ $pre_dep = "$pre_dep,gpt_bios_fake_bootable";
+ last;
+ }
+ }
+ }
+
if ($FAI::configs{$config}{randinit}) {
# ignore exit 1 caused by reaching the end of $real_dev
&FAI::push_command(
The previously sent patch actually doesn't work in every case, the
following patch should work.

