Bug 9431 - No option in installer to install grub2 with non-graphical menu
Summary: No option in installer to install grub2 with non-graphical menu
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal enhancement
Target Milestone: Mageia 6
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 416
  Show dependency treegraph
 
Reported: 2013-03-17 15:38 CET by Barry Jackson
Modified: 2016-02-10 23:30 CET (History)
2 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
add support for grub2-text (untested) (2.82 KB, patch)
2015-05-11 10:38 CEST, Thierry Vignaud
Details | Diff
add support for grub2-text (untested) (2.81 KB, patch)
2015-05-11 14:19 CEST, Thierry Vignaud
Details | Diff
add support for grub2-text (3.32 KB, patch)
2015-05-11 15:02 CEST, Thierry Vignaud
Details | Diff
do use new 2nd screen for both grub2 & grub2-graphic (522 bytes, patch)
2015-05-11 16:18 CEST, Thierry Vignaud
Details | Diff

Description Barry Jackson 2013-03-17 15:38:46 CET
Description of problem:
The installer only offers grub2 with graphical menu. Minimal installations will not require the theme, so grub2 should be installed --no-suggests in this case.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.


Reproducible: 

Steps to Reproduce:
Comment 1 Thierry Vignaud 2015-05-11 10:37:57 CEST
That would mean stripping grub2 from its recommends on grub2-mageia-theme then using the attached patch

Keywords: (none) => PATCH
CC: (none) => thierry.vignaud, zen25000
Blocks: (none) => 416

Comment 2 Thierry Vignaud 2015-05-11 10:38:02 CEST
Created attachment 6486 [details]
add support for grub2-text (untested)
Comment 3 Barry Jackson 2015-05-11 13:01:42 CEST
I tested by patching bootloader.pm locally and running drakboot...

The "drakboot" program has crashed with the following error:

  undefined value for mandatory argument 'text' encountered at /usr/lib/libDrakX/ugtk3.pm line 1430.
  	...propagated at /usr/libexec/drakboot line 64.
Comment 4 Thierry Vignaud 2015-05-11 14:19:42 CEST
Created attachment 6489 [details]
add support for grub2-text (untested)

s/grub2-menu/grub2/

BTW in case the grub2 theme is already installed, I guess we should alter some value in /etc/default/grub ?

Attachment 6486 is obsolete: 0 => 1

Comment 5 Barry Jackson 2015-05-11 14:41:43 CEST
(In reply to Thierry Vignaud from comment #4)
> Created attachment 6489 [details]
> add support for grub2-text (untested)
> 
> s/grub2-menu/grub2/

Gets a lot further now:

The "drakboot" program has crashed with the following error:

  Undefined subroutine &bootloader::get_grub2_append called at /usr/lib/libDrakX/any.pm line 621.
  	...propagated at /usr/libexec/drakboot line 64.

> 
> BTW in case the grub2 theme is already installed, I guess we should alter
> some value in /etc/default/grub ?

Yes it needs the GRUB_THEME= line either removing or commenting followed by update-grub.
Comment 6 Thierry Vignaud 2015-05-11 14:43:59 CEST
Your error is b/c you're not up to date (16.92+ for all of drakxtools*)
Comment 7 Thierry Vignaud 2015-05-11 15:02:36 CEST
Created attachment 6500 [details]
add support for grub2-text

This works smoothly for me

modulo screen is no more translated as the following is no more inserted:
    set locale_dir=...
    set lang=...
    insmode gettext

Attachment 6489 is obsolete: 0 => 1

Comment 8 Thierry Vignaud 2015-05-11 15:05:36 CEST
That's because grub2-mkconfig explicitly run "export LANG=C" if GRUB_TERMINAL_OUTPUT is neither gfxterm nor invalid
Comment 9 Barry Jackson 2015-05-11 15:23:19 CEST
Yes that works to go to grub2-text, but on changing back to graphical using drakboot, it offers to edit the menu entries which it did not do when setting up the text bootloader.
Comment 10 Barry Jackson 2015-05-11 15:33:49 CEST
I just confirmed that the unpatched bootloader.pm does not offer to edit the menu when installing the graphical so this looks a regression caused by the patch.
Comment 11 Thierry Vignaud 2015-05-11 15:41:44 CEST
We just need to use:
    main_method($bootloader->{method})
instead of:
    $bootloader->{method}

in any.pm
Comment 12 Thierry Vignaud 2015-05-11 16:18:38 CEST
Created attachment 6501 [details]
do use new 2nd screen for both grub2 & grub2-graphic
Comment 13 Barry Jackson 2015-05-11 17:27:58 CEST
any.pm?? Sorry you lost me

/usr/lib/libDrakX/any.pm
/usr/lib/libDrakX/fs/any.pm
/usr/lib/libDrakX/resize_fat/any.pm

?? none of the above seem relevant
Comment 14 Thierry Vignaud 2015-05-11 18:08:41 CEST
The first one is the one.
All patches are to be applied in /usr/lib/libDrakX
Comment 15 Barry Jackson 2015-05-11 19:05:48 CEST
Thanks

Yes that now works fine - you are on a roll! :-)
Comment 16 Barry Jackson 2015-05-11 19:12:56 CEST
BTW could the installer uninstall/not install the theme if grub2-text is selected, so someone doing a minimal installation can avoid the overhead of have a useless theme installed? Maybe something for Mga6.
Comment 17 Samuel Verschelde 2015-05-11 19:29:23 CEST
If it's for Mageia 6 or later, better create a bug report so that it's not forgotten.
Comment 18 Thierry Vignaud 2015-05-11 20:12:14 CEST
Minimal install enables to unselect recommends.
But as I wrote, those patches will land at the same time we remove the recommends
 on grub2-mageia-theme from grub2
Thierry Vignaud 2015-06-02 14:58:53 CEST

Status: NEW => ASSIGNED
Assignee: bugsquad => thierry.vignaud
Target Milestone: --- => Mageia 6

Comment 19 Mageia Robot 2016-02-10 23:23:38 CET
commit 205198fbd2e4802d9faf079e46d132aee63d0380
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Mon May 11 04:41:05 2015 -0400

    add support for grub2-text too (mga#9431)
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=205198fbd2e4802d9faf079e46d132aee63d0380
Comment 20 Thierry Vignaud 2016-02-10 23:29:55 CET
Fixed

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

Comment 21 Mageia Robot 2016-02-10 23:30:21 CET
commit ec8ad5d9c776f8e064e2478561f5bc0d02112aa3
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Wed Feb 10 23:28:04 2016 +0100

    do use new 2nd screen for both grub2(|-graphic)
    
    see mga#9431
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=ec8ad5d9c776f8e064e2478561f5bc0d02112aa3

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