WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] pygrub: prefer Grub2 to Grub1

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] pygrub: prefer Grub2 to Grub1
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Fri, 15 Jul 2011 13:33:51 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Fri, 15 Jul 2011 05:34:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1310732992 -3600
# Node ID ce70db62e49c55223d2fab3652b6ec8e1e5520df
# Parent  c42840aa785e0b22abae2cffdcd53843f73ccbc1
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@xxxxxxxxxx>

diff -r c42840aa785e -r ce70db62e49c tools/pygrub/src/pygrub
--- a/tools/pygrub/src/pygrub   Fri Jul 15 13:29:52 2011 +0100
+++ b/tools/pygrub/src/pygrub   Fri Jul 15 13:29:52 2011 +0100
@@ -385,14 +385,14 @@ class Grub:
                            # 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),
+            cfg_list = map(lambda x: (x,grub.GrubConf.Grub2ConfigFile),
                            ["/boot/grub/grub.cfg", "/grub/grub.cfg"]) + \
                        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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>