forked from pool/grub2
2764c99fe0
I think it is good time to update to 2.02 so it can get more testing. Although internal changes are pretty extensive, externally it should be pretty much the same. The main user visible changes are - autogen is not used anymore, so we can finally simplify patches and recreate files during RPM build. So generated files need not be patched and shipped any more. - GRUB_HIDDEN_TIMEOUT is deprecated, we should use GRUB_TIMEOUT_STYLE instead. This will need perl-Bootloader and YaST changes. Old config is still accpepted so nothing should be broken. - native pvgrub2 support for Xen PV guests. - ARM support (32 and 64 bit), although it has rough edges. OBS-URL: https://build.opensuse.org/request/show/212604 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=62
56 lines
2.4 KiB
Diff
56 lines
2.4 KiB
Diff
From b411dc88b46890400a2e1ba0aa8650e00f738c23 Mon Sep 17 00:00:00 2001
|
|
From: Michael Chang <mchang@suse.com>
|
|
Date: Thu, 19 Jul 2012 18:43:55 +0800
|
|
Subject: [PATCH] fix menu in xen host server
|
|
|
|
References: bnc#771689, bnc#757895
|
|
Patch-Mainline: no
|
|
|
|
When system is configred as "Xen Virtual Machines Host Server", the
|
|
grub2 menu is not well organized. We could see some issues on it.
|
|
|
|
- Many duplicated xen entries generated by links to xen hypervisor
|
|
- Non bootable kernel entries trying to boot xen kernel natively
|
|
- The -dbg xen hypervisor takes precedence over release version
|
|
|
|
This patch fixes above three issues.
|
|
---
|
|
util/grub-mkconfig_lib.in | 5 +++++
|
|
util/grub.d/10_linux.in | 12 ++++++++++--
|
|
util/grub.d/20_linux_xen.in | 6 ++++--
|
|
3 files changed, 19 insertions(+), 4 deletions(-)
|
|
|
|
Index: grub-2.02~beta2/util/grub-mkconfig_lib.in
|
|
===================================================================
|
|
--- grub-2.02~beta2.orig/util/grub-mkconfig_lib.in
|
|
+++ grub-2.02~beta2/util/grub-mkconfig_lib.in
|
|
@@ -248,6 +248,11 @@ version_test_gt ()
|
|
*.old:*.old) ;;
|
|
*.old:*) version_test_gt_a="`echo -n "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;
|
|
*:*.old) version_test_gt_b="`echo -n "$version_test_gt_b" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=ge ;;
|
|
+# bnc#757895 - Grub2 menu items incorrect when "Xen Virtual Machines Host Server" selected
|
|
+# The dbg version should be placed after release version
|
|
+ dbg-*:dbg-*) ;;
|
|
+ dbg-*:*) version_test_gt_a="" ;;
|
|
+ *:dbg-*) version_test_gt_b="" ;;
|
|
esac
|
|
version_test_numeric "$version_test_gt_a" "$version_test_gt_cmp" "$version_test_gt_b"
|
|
return "$?"
|
|
Index: grub-2.02~beta2/util/grub.d/20_linux_xen.in
|
|
===================================================================
|
|
--- grub-2.02~beta2.orig/util/grub.d/20_linux_xen.in
|
|
+++ grub-2.02~beta2/util/grub.d/20_linux_xen.in
|
|
@@ -165,8 +165,10 @@ file_is_not_sym () {
|
|
esac
|
|
}
|
|
|
|
-xen_list=`for i in /boot/xen*; do
|
|
- if grub_file_is_not_garbage "$i" && file_is_not_sym "$i" ; then echo -n "$i " ; fi
|
|
+# bnc#757895 - Grub2 menu items incorrect when "Xen Virtual Machines Host Server" selected
|
|
+# wildcard expasion with correct suffix (.gz) and exclude symlinks for not generating many duplicated menu entries
|
|
+xen_list=`for i in /boot/xen*.gz; do
|
|
+ if grub_file_is_not_garbage "$i" && file_is_not_sym "$i" && test ! -L "$i" ; then echo -n "$i " ; fi
|
|
done`
|
|
prepare_boot_cache=
|
|
boot_device_id=
|