From 6a7b68fb08c2937e111777b720bcbc1a97b01984 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 19 Nov 2018 23:25:59 +0100 Subject: (allowed_boot_disks) split it out needed for next commit --- perl-install/bootloader.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'perl-install/bootloader.pm') diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index fd2f85169..9b0c19ed8 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -789,13 +789,18 @@ Returns list of places where we can install the bootloader when not in UEFI mode =cut +sub allowed_boot_disks { + my ($all_hds) = @_; + # 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}}; +} + sub allowed_boot_parts { my ($bootloader, $all_hds) = @_; ( - ( # 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 + allowed_boot_disks($all_hds), # MBR if_($bootloader->{method} =~ /lilo/, grep { $_->{level} eq '1' } @{$all_hds->{raids}} -- cgit v1.2.1