Bug 20338 - On Mga5 to Mga6 upgrade a bios_boot partition in being required if disk is gpt.
Summary: On Mga5 to Mga6 upgrade a bios_boot partition in being required if disk is gpt.
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: release_blocker normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2017-02-23 14:58 CET by Charles Edwards
Modified: 2017-04-21 08:19 CEST (History)
5 users (show)

See Also:
Source RPM:
CVE:
Status comment: Patch pushed, to be tested in drakx 17.77 or later


Attachments
report from Mga6 upgrade requiring bios_boot (23.29 KB, application/x-xz)
2017-02-23 18:29 CET, Charles Edwards
Details
Proposed fix (2.00 KB, patch)
2017-02-25 22:17 CET, Martin Whitaker
Details | Diff

Description Charles Edwards 2017-02-23 14:58:29 CET
Mga5 was installed on /dev/sdx a gpt disk.
It uses grub to boot from MBR on /dev/sdx.

When I try to update that drive to Mga6 the installer balks and will not proceed because the disk does not contain a bios_boot partition.

Because grub is being used for Mga5 it can also be used for the upgraded Mga6
which means that the bootloader does not need a bios_boot partition.
Comment 1 Marja Van Waes 2017-02-23 15:19:03 CET
please compress and then attach

  /root/report.bug

from the time of the upgrade

Keywords: (none) => NEEDINFO
CC: (none) => mageiatools, marja11, zen25000

Comment 2 Charles Edwards 2017-02-23 18:29:56 CET
Created attachment 8980 [details]
report from Mga6 upgrade requiring bios_boot
Comment 3 Thierry Vignaud 2017-02-23 22:01:06 CET
Martin, would you patches handle that case too?

CC: (none) => mageia, thierry.vignaud

Comment 4 Martin Whitaker 2017-02-24 00:45:24 CET
(In reply to Thierry Vignaud from comment #3)
> Martin, would you patches handle that case too?

No, because there is only a GPT disk in this case. For new installs we only support grub2, so it's right to insist on a BIOS boot partition. For upgrades, we still support legacy grub, so it isn't needed. I think the fix for this is to skip the is_boot_bios_part_needed() check when $o->{isUpgrade} is set.
Marja Van Waes 2017-02-24 20:06:31 CET

Assignee: bugsquad => mageiatools

Marja Van Waes 2017-02-24 20:06:41 CET

Keywords: NEEDINFO => (none)

Comment 5 Martin Whitaker 2017-02-25 22:17:29 CET
Created attachment 8988 [details]
Proposed fix

e.g. like this. Tested in Vbox. The only issue I saw was that if you try to modify the bootloader at the end of the upgrade, you are no longer given the option to install it in the MBR
Comment 6 Thierry Vignaud 2017-02-26 09:21:02 CET
Comment on attachment 8988 [details]
Proposed fix

It might be simpler to not add a new parameter and just check for $::o->{isUpgrade}
Thierry Vignaud 2017-02-26 09:21:14 CET

Attachment 8988 is patch: 0 => 1

Comment 7 Martin Whitaker 2017-03-15 10:09:32 CET
(In reply to Thierry Vignaud from comment #6)
> Comment on attachment 8988 [details]
> Proposed fix
> 
> It might be simpler to not add a new parameter and just check for
> $::o->{isUpgrade}

Long ago when I was taught programming, global variables were frowned upon ;-)

But feel free to modify my patch.

Changing this to a release blocker because it affects the installer and any fix needs to be on the released ISOs.

Keywords: (none) => PATCH
Priority: Normal => release_blocker

Comment 8 Frédéric "LpSolit" Buclin 2017-03-27 18:02:27 CEST
Does this patch need some work? If not, could it be committed, please? :) This bug is a release blocker.
Comment 9 Thierry Vignaud 2017-03-28 03:09:34 CEST
It looks sane
Comment 10 Rémi Verschelde 2017-04-04 10:28:11 CEST
@Martin, go ahead and commit :)
Rémi Verschelde 2017-04-04 10:58:57 CEST

Status comment: (none) => Approved patch, needs to be pushed to git and packaged

Comment 11 Mageia Robot 2017-04-04 20:06:50 CEST
commit 6753abe33da73245f22908724f671334de56cd09
Author: Martin Whitaker <mageia@...>
Date:   Sat Feb 25 21:01:34 2017 +0000

    Don't require a BIOS boot partition when performing an upgrade (mga#20338)
    
    If we are upgrading a system on a GPT disk and it doesn't currently
    have a BIOS boot partition, the old system must be using a legacy
    bootloader (e.g. grub). We support the continued use of legacy
    bootloaders in an upgrade, so there is no need to insist on a BIOS
    boot partition in this case.
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=6753abe33da73245f22908724f671334de56cd09
Rémi Verschelde 2017-04-04 20:08:00 CEST

Status comment: Approved patch, needs to be pushed to git and packaged => Patch pushed, to be tested in drakx 17.77 or later

Comment 12 Thierry Vignaud 2017-04-21 08:19:48 CEST
Closing

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.