Bug 15675 - we need to generate a failsafe entry in grub2.cfg
Summary: we need to generate a failsafe entry in grub2.cfg
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Barry Jackson
QA Contact:
Depends on:
Blocks: 416
  Show dependency treegraph
Reported: 2015-04-10 17:24 CEST by Thierry Vignaud
Modified: 2015-04-15 06:06 CEST (History)
1 user (show)

See Also:
Source RPM: grub2
Status comment:


Description Thierry Vignaud 2015-04-10 17:24:09 CEST
grub2 autogenerate /boot/grub2/grub.cfg.
But we miss a failsafe entry like we've with eg: grub
=> we need to generate a failsafe entry in grub2.cfg through a custom in /etc/grub.d/


Steps to Reproduce:
Thierry Vignaud 2015-04-10 17:24:16 CEST

Blocks: (none) => 416

Comment 1 Barry Jackson 2015-04-10 23:37:44 CEST
This can be enabled in grub2-mkconfig with the GRUB_DISABLE_RECOVERY=false var in /etc/default/grub

SuSE has a nice patch which allows for setting a string of kernel parameters for the recovery mode using GRUB_CMDLINE_LINUX_RECOVERY. I have this working in a test build.

What would you recommend that we should use?
The string that SuSE uses is:
"showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe"

CC: (none) => tmb

Comment 2 Thierry Vignaud 2015-04-13 09:56:51 CEST
We don't care about what does Suse :-)
Just add "failsafe" which is what we do for LILO/GRUB and voila.
Comment 3 Thierry Vignaud 2015-04-13 09:57:38 CEST
Which means drakboot must set GRUB_CMDLINE_LINUX_RECOVERY=false then?
Comment 4 Barry Jackson 2015-04-13 10:53:19 CEST
(In reply to Thierry Vignaud from comment #3)
> Which means drakboot must set GRUB_CMDLINE_LINUX_RECOVERY=false then?

That replaces "splash" with "single" in the kernel command line. If that is what what you want, then yes.

With the suse patch you can specify exactly what to add.

Having never used a 'failsafe' entry I'm not sure what you are expecting (or to be honest, why it's needed ;)
Comment 5 Barry Jackson 2015-04-13 11:09:41 CEST
> (In reply to Thierry Vignaud from comment #3)
> > Which means drakboot must set GRUB_CMDLINE_LINUX_RECOVERY=false then?

Err NO! I misread your question - GRUB_CMDLINE_LINUX_RECOVERY does not exist (is not recognised) by current system - that is a new variable used when the SuSE patch is applied.

GRUB_DISABLE_RECOVERY=false is what I thought you meant :)

It is already in the default /etc/default/grub and set to true.
Comment 6 Thierry Vignaud 2015-04-13 12:02:19 CEST
So we need to set it to false in /etc/default/grub.
And we need to patch grub2 to replace "splash" by "failsafe" instead of "single"
Comment 7 Barry Jackson 2015-04-13 12:15:06 CEST
OK I can do that, but what about:

%config(noreplace) %{_sysconfdir}/default/grub

It will only be applied to new installs.
Comment 8 Thierry Vignaud 2015-04-13 13:13:55 CEST
Actually, it would be drakboot job to alter /etc/default/grub.
grub2 should only be patched for the "failsafe" keyword
Comment 9 Barry Jackson 2015-04-13 13:33:45 CEST
OK I have committed an update to grub2, patched to use 'failsafe' rather than 'single' when GRUB_DISABLE_RECOVERY=false, but I have left the default /etc/default/grub untouched.
Comment 10 Mageia Robot 2015-04-13 17:48:36 CEST
commit 722ad19a2716ce13de4fe46cac1dccf4935afafc
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Mon Apr 13 08:35:56 2015 -0400

    do generate 'failsafe' entry for grub2 (mga#15675)
 Commit Link:
Comment 11 Thierry Vignaud 2015-04-15 06:06:26 CEST

Resolution: (none) => FIXED

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