Skip to contentSkip to conversation

Patch to fix pygrub with grub2 when /boot is a separate partition

PATCH David Markey 2 participants 3 messages Mar 5, 2010

lore
Share & tools
lore
#0 lore raw

Pygrub doesn't detect the grub2 config file when it's on a separate /boot partition. This should fix it.

b/usr/bin/pygrub 2010-03-05 08:16:57.000000000 +0000 renamed from a/usr/bin/pygrub 2010-03-04 12:32:36.000000000 +0000 +1 -1
@@ -383,7 +383,7 @@
                            ["/boot/grub/menu.lst", "/boot/grub/grub.conf",
                             "/grub/menu.lst", "/grub/grub.conf"]) + \
                        map(lambda x: (x,grub.GrubConf.Grub2ConfigFile),
-                           ["/boot/grub/grub.cfg"])
+                           ["/boot/grub/grub.cfg","/grub/grub.cfg"])
 
         if not fs:
             # set the config file and parse it

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Acked-by
#1 lore raw
Quoted 2 lines · David Markey

Pygrub doesn't detect the grub2 config file when it's on a separate /boot partition. This should fix it.

Thanks. You should include a Signed-off-by line.

Ian.

Quoted 20 lines
b/usr/bin/pygrub 2010-03-05 08:16:57.000000000 +0000 renamed from a/usr/bin/pygrub 2010-03-04 12:32:36.000000000 +0000 +1 -1
@@ -383,7 +383,7 @@
                            ["/boot/grub/menu.lst",
 "/boot/grub/grub.conf",
                             "/grub/menu.lst", "/grub/grub.conf"]) + \
                        map(lambda x:
 (x,grub.GrubConf.Grub2ConfigFile),
-                           ["/boot/grub/grub.cfg"])
+                           ["/boot/grub/grub.cfg","/grub/grub.cfg"])
 

if not fs:
# set the config file and parse it

#2 lore raw

Oops sorry.

b/usr/bin/pygrub 2010-03-05 08:16:57.000000000 +0000 renamed from a/usr/bin/pygrub 2010-03-04 12:32:36.000000000 +0000 +1 -1
@@ -383,7 +383,7 @@
                            ["/boot/grub/menu.lst", "/boot/grub/grub.conf",
                             "/grub/menu.lst", "/grub/grub.conf"]) + \
                        map(lambda x: (x,grub.GrubConf.Grub2ConfigFile),
-                           ["/boot/grub/grub.cfg"])
+                           ["/boot/grub/grub.cfg","/grub/grub.cfg"])
 
         if not fs:
             # set the config file and parse it
Quoted 26 lines · Ian Campbell
Quoted 2 lines · David Markey

Pygrub doesn't detect the grub2 config file when it's on a separate /boot partition. This should fix it.

Thanks. You should include a Signed-off-by line.

Ian.

Quoted 16 lines
b/usr/bin/pygrub 2010-03-05 08:16:57.000000000 +0000 renamed from a/usr/bin/pygrub 2010-03-04 12:32:36.000000000 +0000 +1 -1
@@ -383,7 +383,7 @@
                            ["/boot/grub/menu.lst",
 "/boot/grub/grub.conf",
                             "/grub/menu.lst", "/grub/grub.conf"]) + \
                        map(lambda x:
 (x,grub.GrubConf.Grub2ConfigFile),
-                           ["/boot/grub/grub.cfg"])
+                           ["/boot/grub/grub.cfg","/grub/grub.cfg"])
 
Quoted 7 lines
Quoted 4 lines

if not fs:
# set the config file and parse it

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel