Bug 20967 - GRUB Error 17 at reboot after an install of Mageia 6 RC on a dual boot configuration with Windows 10
Summary: GRUB Error 17 at reboot after an install of Mageia 6 RC on a dual boot config...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: High major
Target Milestone: Mageia 6
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2017-05-29 11:13 CEST by Sébastien GUERIN
Modified: 2017-05-31 10:24 CEST (History)
4 users (show)

See Also:
Source RPM: drakx-installer-stage2
CVE:
Status comment:


Attachments
report.bug.xz (178.50 KB, application/octet-stream)
2017-05-29 19:16 CEST, Sébastien GUERIN
Details

Description Sébastien GUERIN 2017-05-29 11:13:16 CEST
Description of problem:

During installation process, I chose a custom disk partitioning with a swap partition of 2.8GB and the remaining space in ext4 for "/", while keeping my Windows 10 partitions. 
Installation end with no error but after rebooting, the following message appears : 

>> GRUB Loading stage1.5
>>
>> GRUB Loading, please wait...
>> Error 17

Impossible to go further...

So I've restored my Windows 10 boot with a Windows install disk in order to boot again in Windows 10, but no Mageia 6 for me...
Sébastien GUERIN 2017-05-29 11:13:33 CEST

CC: (none) => sebastien.guerin.news

Comment 1 Sébastien GUERIN 2017-05-29 11:22:25 CEST
I've tried to reboot in rescue mode with my Mageia install USB key after the problem occurs. In the partition table, I can see a new EFI partition tagged "mageia". When I look the boot order in BIOS, that partition is the first one, is it normal ?
Rémi Verschelde 2017-05-29 11:43:07 CEST

Priority: Normal => High
Assignee: bugsquad => mageiatools
Target Milestone: --- => Mageia 6
Source RPM: (none) => drakx-installer-stage2

Comment 2 Barry Jackson 2017-05-29 17:39:08 CEST
Seems that you have somehow ended up with a mix of grub legacy and grub2 on an UEFI machine.
The error you are seeing is from grub legacy, but if a new EFI partition has been created then it would indicate that the install media was booted in UEFI mode, which should have only installed grub2.

Could you please attach the file /root/drakx/report.bug.xz from the Mageia installation?

CC: (none) => zen25000
Keywords: (none) => NEEDINFO

Comment 3 Sébastien GUERIN 2017-05-29 19:16:47 CEST
Created attachment 9355 [details]
report.bug.xz

Before this install, multiboot (Windows 10 + Mageia 5) had been created by the install media of Mageia 5.
Please find my report.bug.xz enclosed
Comment 4 Barry Jackson 2017-05-29 22:14:59 CEST
Ah...
There was no mention of a Mageia 5 install in the original report.

So, am I correct in assuming that:

1. You originally installed Mageia 5 in PC-BIOS mode with legacy grub alongside Windows.

2. You then installed Mageia 6 in UEFI mode replacing the Mageia 5 install.

If this is true then you still have a legacy grub bootloader first stage in the MBR which will fail if you attempt to boot in PC-BIOS mode.

Can you try booting in UEFI mode? (Probably via some 'bios' feature - this varies from one machine to another so difficult to advise)

If my assumptions are wrong then please explain exactly what was done in more detail.
Comment 5 Sébastien GUERIN 2017-05-30 00:39:06 CEST
Yes you are right!

Indeed, my BIOS accepts both methods for booting but it tries legacy first.
So I've forced UEFI mode but it doesn't find Mageia and fall over PXE boot...

I've tried to restore bootloader from Mageia rescue but it doesn't work either.

Maybe Windows 10 boot restore broke something... I will try a total reinstall tomorrow. Thanks.
Comment 6 Barry Jackson 2017-05-30 10:54:42 CEST
It may be quicker to make a SuperGrub CD or USB stick to boot into Mageia 6 and restore the bootloader from within Mageia.
It is a very small download.
https://sourceforge.net/projects/supergrub2/

In a terminal:
su
grub2-install

I don't think you should have tried to upgrade from a legacy grub install to a UEFI one, although advice on this in the Mageia 6 release notes is somewhat confusing.

https://wiki.mageia.org/en/Mageia_6_Release_Notes#Upgrading_from_Mageia_5

If your hardware insists on booting legacy first then I guess that a way must be found to remove the legacy bootloader from the MBR or this will continue to happen, even after a clean UEFI install. Maybe removing the 'boot' flag from the disk would achieve this (just a guess).

Is the Windows installation UEFI?
Comment 7 Barry Jackson 2017-05-30 13:47:54 CEST
Looking more closely at your report.bug it seems that your HD is not currently GPT so you will need to re-install Mageia 6 from scratch in PC-BIOS mode.

I am puzzled as to how the installer managed to complete a UEFI install on a non-GPT drive.

cc-ing tv

CC: (none) => thierry.vignaud

Comment 8 Charles Edwards 2017-05-30 14:18:08 CEST
The installer in Mga6 Does Not require that a disc be GPT for a UEFI install on an existing drive.
It will only change the disc to GPT if the 'erase and use entire disc' is selected.

CC: (none) => cae

Comment 9 Sébastien GUERIN 2017-05-30 15:28:17 CEST
(In reply to Barry Jackson from comment #6)
> Is the Windows installation UEFI?
No, my Windows installation is a legacy boot.

(In reply to Barry Jackson from comment #7)
> you will need to re-install Mageia 6 from scratch in
> PC-BIOS mode.
I don't remember where this option is during the install process... Should I download another iso or I can do this with the same install media ?
Comment 10 Barry Jackson 2017-05-30 17:39:58 CEST
(In reply to Charles Edwards from comment #8)
> The installer in Mga6 Does Not require that a disc be GPT for a UEFI install
> on an existing drive.
> It will only change the disc to GPT if the 'erase and use entire disc' is
> selected.

So this (second line, first para) is wrong then? 
https://wiki.mageia.org/en/Installing_on_systems_with_UEFI_firmware#Good_to_know

@Sebastien

The mode (UEFI/PC-BIOS) is determined by the mode the system uses to boot the install media. Screenshots are normally on the above linked page but these are currently off-line (probably stored on the server which is being upgraded).
Comment 11 Sébastien GUERIN 2017-05-31 10:24:25 CEST
Ok, by forcing legacy mode in BIOS, install media boots in legacy mode and so install goes on and reboot is ok.
Thanks a lot.

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


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