Mageia Bugzilla – Attachment 7867 Details for
Bug 18560
MCC->boot->Set up boot system fails to set correct default menu entry for grub2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
grub2: set GRUB_DEFAULT
0001-grub2-set-GRUB_DEFAULT.patch (text/plain), 1.07 KB, created by
Thierry Vignaud
on 2016-05-27 17:07:58 CEST
(
hide
)
Description:
grub2: set GRUB_DEFAULT
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2016-05-27 17:07:58 CEST
Size:
1.07 KB
patch
obsolete
>From 98e098f5975f2005b3193ea69bf6e993d9bd794d Mon Sep 17 00:00:00 2001 >From: Thierry Vignaud <tvignaud@redhat.com> >Date: Fri, 27 May 2016 16:38:51 +0200 >Subject: [PATCH 1/2] grub2: set GRUB_DEFAULT > >else grub2-set-default won't work >but do not overwrite it if user has changed its value >--- > perl-install/bootloader.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm >index 7848af1..b6d66d4 100644 >--- a/perl-install/bootloader.pm >+++ b/perl-install/bootloader.pm >@@ -1777,6 +1777,8 @@ sub write_grub2 { > $conf{GRUB_CMDLINE_LINUX_DEFAULT} = get_grub2_append($bootloader); > $conf{GRUB_GFXPAYLOAD_LINUX} = 'auto' if is_uefi(); > $conf{GRUB_DISABLE_RECOVERY} = 'false'; # for 'failsafe' entry >+ $conf{GRUB_DEFAULT} ||= 'saved'; # for default entry but do not overwrite user choice >+ $conf{GRUB_SAVEDEFAULT} ||= 'true'; # for default entry but do not overwrite user choice > $conf{GRUB_TIMEOUT} = $bootloader->{timeout}; > renamef($f, $f . ($o_backup_extension || '.old')); > setVarsInSh($f, \%conf); >-- >2.5.5 >
From 98e098f5975f2005b3193ea69bf6e993d9bd794d Mon Sep 17 00:00:00 2001 From: Thierry Vignaud <tvignaud@redhat.com> Date: Fri, 27 May 2016 16:38:51 +0200 Subject: [PATCH 1/2] grub2: set GRUB_DEFAULT else grub2-set-default won't work but do not overwrite it if user has changed its value --- perl-install/bootloader.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 7848af1..b6d66d4 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1777,6 +1777,8 @@ sub write_grub2 { $conf{GRUB_CMDLINE_LINUX_DEFAULT} = get_grub2_append($bootloader); $conf{GRUB_GFXPAYLOAD_LINUX} = 'auto' if is_uefi(); $conf{GRUB_DISABLE_RECOVERY} = 'false'; # for 'failsafe' entry + $conf{GRUB_DEFAULT} ||= 'saved'; # for default entry but do not overwrite user choice + $conf{GRUB_SAVEDEFAULT} ||= 'true'; # for default entry but do not overwrite user choice $conf{GRUB_TIMEOUT} = $bootloader->{timeout}; renamef($f, $f . ($o_backup_extension || '.old')); setVarsInSh($f, \%conf); -- 2.5.5
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18560
: 7867 |
7868
|
8048