forked from pool/grub2
Accepting request 147406 from home:arvidjaar:bnc:779534
- add patch grub2-fix-enumeration-of-extended-partition.patch to fix enumeration of extended partitions with non-standard EBR (bnc#779534) OBS-URL: https://build.opensuse.org/request/show/147406 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=3
This commit is contained in:
parent
65ab51d514
commit
7375ca8ab2
38
grub2-fix-enumeration-of-extended-partition.patch
Normal file
38
grub2-fix-enumeration-of-extended-partition.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From: Andrey Borzenkov <arvidjaar@gmail.com>
|
||||||
|
Subject: [PATCH] fix off by one error in enumerating MSDOS partitions
|
||||||
|
References: bnc#779534
|
||||||
|
|
||||||
|
As reported in https://bugzilla.novell.com/show_bug.cgi?id=779534,
|
||||||
|
grub2 assigns incorrect partition number to extended partitions.
|
||||||
|
This is due to slightly non-standard EBR which contains single extended
|
||||||
|
partition record, but no normal partition. Due to incorrect p.number
|
||||||
|
comparison, grub2 includes it in partition numbering.
|
||||||
|
|
||||||
|
With standard EBR first entry is "true" partition that correctly
|
||||||
|
gets assigned next available number.
|
||||||
|
|
||||||
|
At the point of comparison p.number is one less than partition
|
||||||
|
number; so make correct comparison.
|
||||||
|
|
||||||
|
Actual partition chain is visible in this attachement:
|
||||||
|
http://bugzilla.novell.com/attachment.cgi?id=519076
|
||||||
|
|
||||||
|
Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
|
||||||
|
|
||||||
|
---
|
||||||
|
grub-core/partmap/msdos.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: grub-2.00/grub-core/partmap/msdos.c
|
||||||
|
===================================================================
|
||||||
|
--- grub-2.00.orig/grub-core/partmap/msdos.c
|
||||||
|
+++ grub-2.00/grub-core/partmap/msdos.c
|
||||||
|
@@ -196,7 +196,7 @@ grub_partition_msdos_iterate (grub_disk_
|
||||||
|
return grub_errno;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- else if (p.number < 4)
|
||||||
|
+ else if (p.number < 3)
|
||||||
|
/* If this partition is a logical one, shouldn't increase the
|
||||||
|
partition number. */
|
||||||
|
p.number++;
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jan 6 18:54:54 UTC 2013 - arvidjaar@gmail.com
|
||||||
|
|
||||||
|
- add patch grub2-fix-enumeration-of-extended-partition.patch to
|
||||||
|
fix enumeration of extended partitions with non-standard EBR (bnc#779534)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jan 4 10:29:58 UTC 2013 - arvidjaar@gmail.com
|
Fri Jan 4 10:29:58 UTC 2013 - arvidjaar@gmail.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package grub2
|
# spec file for package grub2
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -132,6 +132,7 @@ Patch22: grub2-secureboot-use-linuxefi-on-uefi.patch
|
|||||||
Patch23: grub2-secureboot-no-insmod-on-sb.patch
|
Patch23: grub2-secureboot-no-insmod-on-sb.patch
|
||||||
Patch24: grub2-secureboot-provide-linuxefi-config.patch
|
Patch24: grub2-secureboot-provide-linuxefi-config.patch
|
||||||
Patch25: 30_os-prober_UEFI_support.patch
|
Patch25: 30_os-prober_UEFI_support.patch
|
||||||
|
Patch26: grub2-fix-enumeration-of-extended-partition.patch
|
||||||
PreReq: perl-Bootloader
|
PreReq: perl-Bootloader
|
||||||
Requires: gettext-runtime
|
Requires: gettext-runtime
|
||||||
%if 0%{?suse_version} >= 1140
|
%if 0%{?suse_version} >= 1140
|
||||||
@ -244,6 +245,7 @@ mv docs/grub.texi docs/grub2.texi
|
|||||||
%patch23 -p1
|
%patch23 -p1
|
||||||
%patch24 -p1
|
%patch24 -p1
|
||||||
%patch25 -p1
|
%patch25 -p1
|
||||||
|
%patch26 -p1
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# README.openSUSE
|
# README.openSUSE
|
||||||
@ -418,7 +420,6 @@ elif [ "x${LOADER_TYPE}" = "xgrub2" ]; then
|
|||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%ifarch %{efi}
|
%ifarch %{efi}
|
||||||
|
|
||||||
%triggerpostun -- %{name}-efi
|
%triggerpostun -- %{name}-efi
|
||||||
@ -617,3 +618,5 @@ fi
|
|||||||
%{_libdir}/%{name}/%{grubefiarch}/kernel.exec
|
%{_libdir}/%{name}/%{grubefiarch}/kernel.exec
|
||||||
%{_libdir}/%{name}/%{grubefiarch}/modinfo.sh
|
%{_libdir}/%{name}/%{grubefiarch}/modinfo.sh
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user