Bug 21247 - Invalid menu entries when switching from grub2 to grub bootloader (and may silently fail to install the grub bootloader)
Summary: Invalid menu entries when switching from grub2 to grub bootloader (and may si...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2017-07-15 12:49 CEST by Martin Whitaker
Modified: 2018-06-11 23:08 CEST (History)
1 user (show)

See Also:
Source RPM: drakxtools-17.88-1.mga6.src.rpm
CVE:
Status comment:


Attachments
Proposed fix (1.40 KB, text/plain)
2017-07-25 01:22 CEST, Martin Whitaker
Details
Updated fix for parsing grub2 entries (936 bytes, text/plain)
2017-11-24 12:43 CET, Martin Whitaker
Details

Description Martin Whitaker 2017-07-15 12:49:36 CEST
In Mageia 5, when modifying a grub menu entry, the drakboot GUI enables you to modify the Label, Image, Root, Append, Default, Video mode, Initrd, and Network profile settings. In Mageia 6, the GUI only allows you to modify the Label, Root, and Default settings.

Although grub2 is now the default bootloader, AFAIK we still support the use of legacy grub, so should not lose this functionality.
Comment 1 Martin Whitaker 2017-07-23 18:07:34 CEST
Further investigation shows this only happens when you use MCC/drakboot to change from grub2 to grub. This does not generate usable menu entries. Furthermore, if /boot is on a 64-bit ext4 filesystem, grub will fail to install, but this is not reported by the GUI.

We could fix this, but would it be better to just disallow switching to the legacy bootloaders? (i.e. once you've converted to grub2, there's no going back).

Summary: Missing GUI elements when modifying legacy grub menu entry in drakboot => Invalid menu entries when switching from grub2 to grub bootloader (and may silently fail to install the grub bootloader)

Comment 2 Martin Whitaker 2017-07-25 01:22:31 CEST
Created attachment 9515 [details]
Proposed fix

This fixes the problem with reading the grub2 menu entries, enabling the user to switch back and forth between grub and grub2 providing they are installing grub on a compatible file system.
Martin Whitaker 2017-07-25 01:23:02 CEST

Keywords: (none) => PATCH

Comment 3 Martin Whitaker 2017-11-24 12:43:42 CET
Created attachment 9801 [details]
Updated fix for parsing grub2 entries

Thierry has independently fixed the parsing of the linux16 keyword, but not the initrd16 keyword.

Attachment 9515 is obsolete: 0 => 1

Comment 4 Mageia Robot 2018-01-09 22:18:23 CET
commit 4d96d7a4c32186d7597f2f8f6f75eb1d8c9bf181
Author: Martin Whitaker <mageia@...>
Date:   Mon Jul 24 23:25:01 2017 +0100

    Fix parsing of grub2 menu entries to support 16-bit mode (mga#21247).
    
    This enables bootloader::read_grub2 to recognise the initrd16 keyword,
    which is used by default on x86 machines.
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=4d96d7a4c32186d7597f2f8f6f75eb1d8c9bf181
Martin Whitaker 2018-05-29 23:16:10 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=23097

Comment 5 Mauricio Andrés Bustamante Viveros 2018-06-04 14:48:01 CEST
Using the update testing package that is related in the parent bug, fixes the no initrd lines in the menuentries

CC: (none) => neoser10

Comment 6 Martin Whitaker 2018-06-11 23:08:02 CEST
Fix released in drakxtools-17.88.2-1.mga6.src.rpm

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


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