Mageia Bugzilla – Attachment 9515 Details for
Bug 21247
Invalid menu entries when switching from grub2 to grub bootloader (and may silently fail to install the grub bootloader)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Proposed fix
0002-Fix-parsing-of-grub2-menu-entries-to-support-16-bit-.patch (text/plain), 1.40 KB, created by
Martin Whitaker
on 2017-07-25 01:22:31 CEST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Martin Whitaker
Created:
2017-07-25 01:22:31 CEST
Size:
1.40 KB
patch
obsolete
>From 0f601ffb2b3270437a981f7d2b9ca73850ffc423 Mon Sep 17 00:00:00 2001 >From: Martin Whitaker <mageia@martin-whitaker.me.uk> >Date: Mon, 24 Jul 2017 23:25:01 +0100 >Subject: [PATCH 2/2] Fix parsing of grub2 menu entries to support 16-bit mode > (mga#21247). > >This enables bootloader::read_grub2 to recognise the linux16 and >initrd16 keywords, which are used by default on x86 machines. > >diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm >index 039ff9145..085d5a262 100644 >--- a/perl-install/bootloader.pm >+++ b/perl-install/bootloader.pm >@@ -321,7 +321,7 @@ sub read_grub2() { > next if /^#/; > if (/menuentry\s+['"]([^']+)["']/) { > $entry = { label => $1, real_label => join('>', @menus, $1) }; >- } elsif (/linux\s+(\S+)\s+(.*)?/ || /module\s+(\S+vmlinu\S+)\s+(.*)?/) { >+ } elsif (/linux(?:16)?\s+(\S+)\s+(.*)?/ || /module\s+(\S+vmlinu\S+)\s+(.*)?/) { > $entry->{type} = 'image'; > @$entry{qw(kernel_or_dev append)} = ($1, $2); > my ($vga, $other) = partition { /^vga=/ } split(' ', $entry->{append}); >@@ -329,7 +329,7 @@ sub read_grub2() { > $entry->{vga} = $vga->[0] =~ /vga=(.*)/ && $1; > $entry->{append} = join(' ', @$other); > } >- } elsif (/initrd\s+(\S+)/ || /module\s+(\S+initrd\S+)\s+(.*)?/) { >+ } elsif (/initrd(?:16)?\s+(\S+)/ || /module\s+(\S+initrd\S+)\s+(.*)?/) { > $entry->{initrd} = $1; > } elsif (/^submenu\s+['"]([^']+)["']/) { > push @menus, $1; >-- >2.13.2 >
From 0f601ffb2b3270437a981f7d2b9ca73850ffc423 Mon Sep 17 00:00:00 2001 From: Martin Whitaker <mageia@martin-whitaker.me.uk> Date: Mon, 24 Jul 2017 23:25:01 +0100 Subject: [PATCH 2/2] Fix parsing of grub2 menu entries to support 16-bit mode (mga#21247). This enables bootloader::read_grub2 to recognise the linux16 and initrd16 keywords, which are used by default on x86 machines. diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 039ff9145..085d5a262 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -321,7 +321,7 @@ sub read_grub2() { next if /^#/; if (/menuentry\s+['"]([^']+)["']/) { $entry = { label => $1, real_label => join('>', @menus, $1) }; - } elsif (/linux\s+(\S+)\s+(.*)?/ || /module\s+(\S+vmlinu\S+)\s+(.*)?/) { + } elsif (/linux(?:16)?\s+(\S+)\s+(.*)?/ || /module\s+(\S+vmlinu\S+)\s+(.*)?/) { $entry->{type} = 'image'; @$entry{qw(kernel_or_dev append)} = ($1, $2); my ($vga, $other) = partition { /^vga=/ } split(' ', $entry->{append}); @@ -329,7 +329,7 @@ sub read_grub2() { $entry->{vga} = $vga->[0] =~ /vga=(.*)/ && $1; $entry->{append} = join(' ', @$other); } - } elsif (/initrd\s+(\S+)/ || /module\s+(\S+initrd\S+)\s+(.*)?/) { + } elsif (/initrd(?:16)?\s+(\S+)/ || /module\s+(\S+initrd\S+)\s+(.*)?/) { $entry->{initrd} = $1; } elsif (/^submenu\s+['"]([^']+)["']/) { push @menus, $1; -- 2.13.2
View Attachment As Raw
Actions:
View
Attachments on
bug 21247
:
9515
|
9801