| Summary: | Installer is wrongly offering option to use GRUB Legacy in live installs | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Dick Gevers <dvgevers> |
| Component: | RPM Packages | Assignee: | Thierry Vignaud <thierry.vignaud> |
| Status: | RESOLVED FIXED | QA Contact: | Mageia tools maintainers <mageiatools> |
| Severity: | normal | ||
| Priority: | release_blocker | CC: | mageia, marja11, ngompa13, sysadmin-bugs, thierry.vignaud |
| Version: | Cauldron | Keywords: | 6sta2, PATCH |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | draklive-install-2.8-1.mga6.src.rpm | CVE: | |
| Status comment: | Patch provided | ||
| Attachments: | do not offer lilo/grub-legacy in live install | ||
|
Description
Dick Gevers
2017-01-08 17:31:23 CET
Dick Gevers
2017-01-08 17:31:43 CET
Keywords:
(none) =>
6sta2
Dick Gevers
2017-01-08 17:33:14 CET
Summary:
Installer has option to choose grub legac6y for bootloader but package not found =>
Installer has option to choose grub legacy for bootloader but package not found
Marja Van Waes
2017-01-08 22:43:06 CET
CC:
(none) =>
marja11 It should not be possible to choose Grub Legacy. CC:
(none) =>
ngompa13 (In reply to Neal Gompa from comment #1) > It should not be possible to choose Grub Legacy. Not in UEFI installs, because Grub legacy won't work there. However, for legacy BIOS installs we only made Grub2 the new default https://wiki.mageia.org/en/Mageia_6_Release_Notes#Grub2_used_as_boot_loader_by_default Grub legacy wasn't obsoleted. Unless I missed something, it should still be selectable outside UEFI installs.
Marja Van Waes
2017-01-09 00:17:19 CET
Summary:
Installer lets you choose grub legacy as bootloader in M6 Live DVD when it should not =>
Installer has option to choose grub legacy for bootloader but package not found (In reply to Marja van Waes from comment #2) > (In reply to Neal Gompa from comment #1) > > It should not be possible to choose Grub Legacy. > > Not in UEFI installs, because Grub legacy won't work there. > > However, for legacy BIOS installs we only made Grub2 the new default > https://wiki.mageia.org/en/ > Mageia_6_Release_Notes#Grub2_used_as_boot_loader_by_default > > Grub legacy wasn't obsoleted. > > Unless I missed something, it should still be selectable outside UEFI > installs. We only support GRUB Legacy as M5->M6 upgrade. New installs should *never* have GRUB Legacy because of the ext4 incompatibility (GRUB Legacy cannot read ext4 created by M6). I believe Neal is correct, and this is the behaviour you'll see with the classic installer. It's not happening in the Live installer because it doesn't set the global $isInstall variable (except in one very restricted area). CC:
(none) =>
mageia
Neal Gompa
2017-01-09 02:22:00 CET
Summary:
Installer has option to choose grub legacy for bootloader but package not found =>
Installer is wrongly offering option to use GRUB Legacy in live installs
Neal Gompa
2017-01-09 02:22:54 CET
Priority:
Normal =>
release_blocker (In reply to Neal Gompa from comment #3) > (In reply to Marja van Waes from comment #2) > > > > Unless I missed something, it should still be selectable outside UEFI > > installs. > > We only support GRUB Legacy as M5->M6 upgrade. New installs should *never* > have GRUB Legacy because of the ext4 incompatibility (GRUB Legacy cannot > read ext4 created by M6). Thanks, so i did miss something ;) I hope i'll remember to make the release notes more clear about it being the only option, when the wiki gets unlocked. draklive-install could set a $::isLiveInstall variable we could test for in bootloader.pm... CC:
(none) =>
thierry.vignaud (In reply to Thierry Vignaud from comment #6) > draklive-install could set a $::isLiveInstall variable we could test for in > bootloader.pm... I'll do that (I've got another bug to fix in draklive-install). Will you do the necessary change in bootloader.pm? Yes But you haven't pushed anything yet... commit 7e28f939b41928fd41efb220af91337b31bfc37a
Author: Martin Whitaker <mageia@...>
Date: Thu Jan 12 18:39:31 2017 +0000
Set a $::isLiveInstall variable for other drakx modules to use.
Part of a fix for mga#20089.
---
Commit Link:
http://gitweb.mageia.org/software/draklive-install/commit/?id=7e28f939b41928fd41efb220af91337b31bfc37a
(In reply to Thierry Vignaud from comment #9) > But you haven't pushed anything yet... Yes, I only have so much free time, and other bugs seemed more urgent... Done now. Created attachment 8863 [details]
do not offer lilo/grub-legacy in live install
To be tested (with a install on UEFI too)
Thierry Vignaud
2017-01-16 11:37:41 CET
Keywords:
(none) =>
PATCH (In reply to Thierry Vignaud from comment #12) > Created attachment 8863 [details] > do not offer lilo/grub-legacy in live install > > To be tested (with a install on UEFI too) Why not just remove the code that supports the older bootloaders entirely? Wouldn't that be simpler and less hacky? Because that would break upgrading from mga5... (In reply to Thierry Vignaud from comment #12) > Created attachment 8863 [details] > do not offer lilo/grub-legacy in live install Those might be silly questions as I'm not very familiar with the code, but: - Doesn't the live installer define `$::isInstall` as true too? If not, I'd say it's confusingly named and should probably be renamed to `$::isClassicalInstall` to avoid logic being written only for the classical installer while forgetting the live installer. - Wouldn't this work? We only want to support install grub-legacy on !efi and upgrades, so: ``` -if_(!is_uefi() && !($::isInstall && !$::o->{isUpgrade}), ( +if_(!is_uefi() && $:o->{isUpgrade}), ( ``` Typo in my fake diff:
```
-if_(!is_uefi() && !($::isInstall && !$::o->{isUpgrade}), (
+if_(!is_uefi() && $::o->{isUpgrade}), (
```
Martin, could you test the patch in comment 12 next time you spin a live ISO? Status comment:
(none) =>
Patch provided, needs testing No. draklive-install doesn't set $::isInstall but for a couple function call. The $::isInstall flag is specific to the classic installer. draklive-install & other standalone tools (eg: drakxtools) do not set it. There's no intention to rename it. There's neither a global $::o variable nor a isUpgrade flag set when used from draklive-install Thanks for the explanations :) Can't wait for our own GitLab or similar to be able to discuss such things in a friendly code commenting interface :D Tested by patching existing Live ISO before running draklive-install. Works as expected - grub2 is the only bootloader requested. Status comment:
Patch provided, needs testing =>
Patch provided commit 0a8596e052f6574d1f052ef46733bfffa190de40
Author: Thierry Vignaud <thierry.vignaud@...>
Date: Mon Jan 16 11:33:04 2017 +0100
do not offer lilo/grub-legacy in live install
Resolves: mga#20089
---
Commit Link:
http://gitweb.mageia.org/software/drakx/commit/?id=0a8596e052f6574d1f052ef46733bfffa190de40
Fixed in git after testing a patched mga6 install Status:
NEW =>
RESOLVED |