Mageia Bugzilla – Attachment 8060 Details for
Bug 18770
[6sta1] grub2-install fails on GPT HDD when OS & BIOS boot part are another GPT disk (!UEFI case)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
filter GPT disks w/o a BIOS boot part (mga#18770)
0001-filter-GPT-disks-w-o-a-BIOS-boot-part-mga-18770.patch (text/plain), 1.35 KB, created by
Thierry Vignaud
on 2016-06-23 19:04:01 CEST
(
hide
)
Description:
filter GPT disks w/o a BIOS boot part (mga#18770)
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2016-06-23 19:04:01 CEST
Size:
1.35 KB
patch
obsolete
>From e3381460aec22d3af6d35a2770680cd38af5a39d Mon Sep 17 00:00:00 2001 >From: Thierry Vignaud <thierry.vignaud@gmail.com> >Date: Thu, 23 Jun 2016 16:40:43 +0200 >Subject: [PATCH] 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(-) > >diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm >index 23331d1..d0d8def 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}} >-- >2.9.0 >
From e3381460aec22d3af6d35a2770680cd38af5a39d Mon Sep 17 00:00:00 2001 From: Thierry Vignaud <thierry.vignaud@gmail.com> Date: Thu, 23 Jun 2016 16:40:43 +0200 Subject: [PATCH] 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(-) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 23331d1..d0d8def 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}} -- 2.9.0
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18770
:
8054
|
8055
| 8060