From a13cd7e81288d76d0c6dc8264cae8b76e1f0ff5b Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 23 Jun 2016 16:40:43 +0200 Subject: filter GPT disks w/o a BIOS boot part (mga#18770) else grub2-install failed with:r "this GPT Partition label contains no BIOS Boot Partition: embedding won't be possible." --- perl-install/bootloader.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 23331d1b2..d0d8def1f 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -694,14 +694,18 @@ sub suggest_onmbr { =item allowed_boot_parts($bootloader, $all_hds) -Returns list of places where we can install the bootloader +Returns list of places where we can install the bootloader when not in UEFI mode +(in UEFI mode, grub2 automatically look for the ESP). =cut sub allowed_boot_parts { my ($bootloader, $all_hds) = @_; ( - @{$all_hds->{hds}}, # MBR + ( # GPT disks w/o a BIOS boot partition do not have free space for grub2 to embed: + grep { c::get_disk_type($_->{file}) ne 'gpt' || + any { isBIOS_GRUB($_) } map { partition_table::get_normal_parts($_) } $_; + } @{$all_hds->{hds}}), # MBR if_($bootloader->{method} =~ /lilo/, grep { $_->{level} eq '1' } @{$all_hds->{raids}} -- cgit v1.2.1