Mageia Bugzilla – Attachment 9822 Details for
Bug 21263
Endless reboot loop after switching from nouveau to nvidia proprietary driver
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Proposed fix v2
0001-Combine-bootloader-perImageAppend-and-default_append.patch (text/plain), 3.02 KB, created by
Martin Whitaker
on 2017-12-08 10:13:02 CET
(
hide
)
Description:
Proposed fix v2
Filename:
MIME Type:
Creator:
Martin Whitaker
Created:
2017-12-08 10:13:02 CET
Size:
3.02 KB
patch
obsolete
>From 8f31ffa8563569f327477217954bf69aabb69d22 Mon Sep 17 00:00:00 2001 >From: Martin Whitaker <mageia@martin-whitaker.me.uk> >Date: Sun, 23 Jul 2017 16:18:49 +0100 >Subject: [PATCH 1/5] Combine bootloader perImageAppend and default_append > keys. > >This allows changes to the append options to propagate to the grub2 >configuration file, thus fixing mga#21263 and mga#21250. > >diff --git a/perl-install/any.pm b/perl-install/any.pm >index e56f6711a..376240aac 100644 >--- a/perl-install/any.pm >+++ b/perl-install/any.pm >@@ -626,7 +626,7 @@ sub setupBootloader__grub2 { > my $b2 = bootloader::read_grub2(); > > # get default parameters: >- my $append = $b->{default_append} || $b->{entries}[0]{append} || bootloader::get_grub2_append($b2); >+ my $append = $b->{perImageAppend} || bootloader::get_grub2_append($b2); > my $default = $b2->{default}; > > require Xconfig::resolution_and_depth; >@@ -661,7 +661,7 @@ sub setupBootloader__grub2 { > $b->{entries} = $b2->{entries}; > $b->{default} = $default; > $b->{vga} = ref($vga) ? $vga->{bios} : $vga; >- $b->{default_append} = $append; >+ $b->{perImageAppend} = $append; > if ($os_prober) { > $in->do_pkgs->ensure_is_installed('os-prober', '/usr/bin/os-prober'); > } else { >diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm >index 42f4f9586..6af1f1680 100644 >--- a/perl-install/bootloader.pm >+++ b/perl-install/bootloader.pm >@@ -307,8 +307,8 @@ sub read_grub2() { > return if is_empty_hash_ref(\%bootloader) & !-s "$::prefix/boot/grub2/grub.cfg"; > my %h = getVarsFromSh("$::prefix/etc/default/grub"); > $bootloader{timeout} = $h{GRUB_TIMEOUT}; >- # on first run (during installer) or when migrating from grub-legacy or lilo: >- $bootloader{default_append} ||= $::isInstall ? get_grub2_append(\%bootloader) : $h{GRUB_CMDLINE_LINUX_DEFAULT}; >+ # keep suggested perImageAppend on first run (during installer) or when migrating from grub-legacy or lilo: >+ $bootloader{perImageAppend} ||= $h{GRUB_CMDLINE_LINUX_DEFAULT}; > $bootloader{entries} = []; > my $entry; > my $f = "$::prefix/boot/grub2/grub.cfg"; >@@ -1228,6 +1228,8 @@ sub suggest { > $bootloader->{method} ||= first(method_choices($all_hds, 1), # best installed > method_choices($all_hds, 0)); # or best if no valid one is installed > >+ $bootloader->{perImageAppend} = $bootloader->{entries}[0]{append}; >+ > if (main_method($bootloader->{method}) eq 'grub') { > my %processed_entries = {}; > foreach my $c (find_other_distros_grub_conf($fstab)) { >@@ -1863,7 +1865,7 @@ sub write_grub2_sysconfig { > my $f = "$::prefix/etc/default/grub"; > my %conf = getVarsFromSh($f); > >- $conf{GRUB_CMDLINE_LINUX_DEFAULT} = $bootloader->{default_append} || get_grub2_append($bootloader); >+ $conf{GRUB_CMDLINE_LINUX_DEFAULT} = $bootloader->{perImageAppend} || 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 >-- >2.13.6 >
From 8f31ffa8563569f327477217954bf69aabb69d22 Mon Sep 17 00:00:00 2001 From: Martin Whitaker <mageia@martin-whitaker.me.uk> Date: Sun, 23 Jul 2017 16:18:49 +0100 Subject: [PATCH 1/5] Combine bootloader perImageAppend and default_append keys. This allows changes to the append options to propagate to the grub2 configuration file, thus fixing mga#21263 and mga#21250. diff --git a/perl-install/any.pm b/perl-install/any.pm index e56f6711a..376240aac 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -626,7 +626,7 @@ sub setupBootloader__grub2 { my $b2 = bootloader::read_grub2(); # get default parameters: - my $append = $b->{default_append} || $b->{entries}[0]{append} || bootloader::get_grub2_append($b2); + my $append = $b->{perImageAppend} || bootloader::get_grub2_append($b2); my $default = $b2->{default}; require Xconfig::resolution_and_depth; @@ -661,7 +661,7 @@ sub setupBootloader__grub2 { $b->{entries} = $b2->{entries}; $b->{default} = $default; $b->{vga} = ref($vga) ? $vga->{bios} : $vga; - $b->{default_append} = $append; + $b->{perImageAppend} = $append; if ($os_prober) { $in->do_pkgs->ensure_is_installed('os-prober', '/usr/bin/os-prober'); } else { diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 42f4f9586..6af1f1680 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -307,8 +307,8 @@ sub read_grub2() { return if is_empty_hash_ref(\%bootloader) & !-s "$::prefix/boot/grub2/grub.cfg"; my %h = getVarsFromSh("$::prefix/etc/default/grub"); $bootloader{timeout} = $h{GRUB_TIMEOUT}; - # on first run (during installer) or when migrating from grub-legacy or lilo: - $bootloader{default_append} ||= $::isInstall ? get_grub2_append(\%bootloader) : $h{GRUB_CMDLINE_LINUX_DEFAULT}; + # keep suggested perImageAppend on first run (during installer) or when migrating from grub-legacy or lilo: + $bootloader{perImageAppend} ||= $h{GRUB_CMDLINE_LINUX_DEFAULT}; $bootloader{entries} = []; my $entry; my $f = "$::prefix/boot/grub2/grub.cfg"; @@ -1228,6 +1228,8 @@ sub suggest { $bootloader->{method} ||= first(method_choices($all_hds, 1), # best installed method_choices($all_hds, 0)); # or best if no valid one is installed + $bootloader->{perImageAppend} = $bootloader->{entries}[0]{append}; + if (main_method($bootloader->{method}) eq 'grub') { my %processed_entries = {}; foreach my $c (find_other_distros_grub_conf($fstab)) { @@ -1863,7 +1865,7 @@ sub write_grub2_sysconfig { my $f = "$::prefix/etc/default/grub"; my %conf = getVarsFromSh($f); - $conf{GRUB_CMDLINE_LINUX_DEFAULT} = $bootloader->{default_append} || get_grub2_append($bootloader); + $conf{GRUB_CMDLINE_LINUX_DEFAULT} = $bootloader->{perImageAppend} || 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 -- 2.13.6
View Attachment As Raw
Actions:
View
Attachments on
bug 21263
:
9511
| 9822 |
9825