2012-06-12 16:47:07 +00:00
|
|
|
# HG changeset patch
|
|
|
|
# User Ian Campbell <ian.campbell@citrix.com>
|
|
|
|
# Date 1310749975 -3600
|
|
|
|
# Node ID 5e1032229546c2d5640dc05205303d91d78a92c3
|
|
|
|
# Parent c1d7fa123dae73708da7306c0ec611d6fa6a6140
|
|
|
|
pygrub: prefer Grub2 to Grub1
|
|
|
|
|
|
|
|
If a VM image has grub2 installed it is likely the one we need to be using.
|
|
|
|
|
|
|
|
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
|
|
|
|
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
|
|
|
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
|
|
|
|
2012-08-10 21:38:41 +00:00
|
|
|
Index: xen-4.1.3-testing/tools/pygrub/src/pygrub
|
|
|
|
===================================================================
|
|
|
|
--- xen-4.1.3-testing.orig/tools/pygrub/src/pygrub
|
|
|
|
+++ xen-4.1.3-testing/tools/pygrub/src/pygrub
|
|
|
|
@@ -394,15 +394,14 @@ class Grub:
|
2012-06-12 16:47:07 +00:00
|
|
|
# fallbacks
|
|
|
|
["/efi/boot/elilo.conf", "/elilo.conf",])
|
|
|
|
else:
|
|
|
|
- cfg_list = map(lambda x: (x,grub.GrubConf.GrubConfigFile),
|
|
|
|
- ["/boot/grub/menu.lst", "/boot/grub/grub.conf",
|
|
|
|
- "/grub/menu.lst", "/grub/grub.conf"]) + \
|
|
|
|
- map(lambda x: (x,grub.GrubConf.Grub2ConfigFile),
|
2012-08-10 21:38:41 +00:00
|
|
|
- ["/boot/grub/grub.cfg", "/grub/grub.cfg",
|
|
|
|
- "/boot/grub2/grub.cfg", "/grub2/grub.cfg"]) + \
|
2012-06-12 16:47:07 +00:00
|
|
|
+ cfg_list = map(lambda x: (x,grub.GrubConf.Grub2ConfigFile),
|
2012-08-10 21:38:41 +00:00
|
|
|
+ ["/boot/grub/grub.cfg", "/grub/grub.cfg"]) + \
|
2012-06-12 16:47:07 +00:00
|
|
|
map(lambda x: (x,grub.ExtLinuxConf.ExtLinuxConfigFile),
|
|
|
|
["/boot/isolinux/isolinux.cfg",
|
|
|
|
- "/boot/extlinux.conf"])
|
|
|
|
+ "/boot/extlinux.conf"]) + \
|
|
|
|
+ map(lambda x: (x,grub.GrubConf.GrubConfigFile),
|
|
|
|
+ ["/boot/grub/menu.lst", "/boot/grub/grub.conf",
|
|
|
|
+ "/grub/menu.lst", "/grub/grub.conf"])
|
|
|
|
|
|
|
|
if not fs:
|
|
|
|
# set the config file and parse it
|