Fix pygrub for IA64 support.
RFC PATCH 1/1 Fix pygrub for IA64 support.
Hi,
I made a patch that fixed pygrub for IA64 support.
This patch purposes to support pygrub on IA64. I just do fix pygrub and add LiloConf.py. (since IA64 uses elilo.conf)
The discussion point is elilo.conf path.
I use "/efi/redhat/elilo.conf"
But this is distributer specific(for example Redhat). Is any idea to fix this issue?
Thanks,
Tomohiro Takahashi.
tools/pygrub/src/pygrub Tue Apr 10 20:30:05 2007 +0900 renamed from tools/pygrub/src/pygrub Mon Apr 09 13:40:25 2007 -0600 +9 -2
@@ -16,6 +16,7 @@ import os, sys, string, struct, tempfile import os, sys, string, struct, tempfile, re import copy import logging +import platform import curses, _curses, curses.wrapper, curses.textpad, curses.ascii import getopt
@@ -24,6 +25,7 @@ sys.path = [ '/usr/lib/python' ] + sys.p import fsimage import grub.GrubConf +import grub.LiloConf PYGRUB_VER = 0.5
@@ -346,7 +355,10 @@ class Grub: if not os.access(fn, os.R_OK): raise RuntimeError, "Unable to access %s" %(fn,) - self.cf = grub.GrubConf.GrubConfigFile() + if platform.machine() == 'ia64': + self.cf = grub.LiloConf.LiloConfigFile() + else: + self.cf = grub.GrubConf.GrubConfigFile() if not fs: # set the config file and parse it
@@ -356,9 +368,11 @@ class Grub: grubfile = None for f in ("/boot/grub/menu.lst", "/boot/grub/grub.conf", - "/grub/menu.lst", "/grub/grub.conf"): + "/grub/menu.lst", "/grub/grub.conf", + "/efi/redhat/elilo.conf"): if fs.file_exists(f): grubfile = f + self.cf.filename = f # for LiloConfigFile break if grubfile is None: raise RuntimeError, "we couldn't find grub config file in the image provided."
tools/pygrub/src/LiloConf.py Tue Apr 10 20:30:05 2007 +0900 renamed from dev/null Thu Jan 01 00:00:00 1970 +0000 +147 -0
147 lines not on this page · raw message
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 15 lines · Takahashi Tomohiro
Hi,
I made a patch that fixed pygrub for IA64 support.
This patch purposes to support pygrub on IA64. I just do fix pygrub and add
LiloConf.py. (since IA64 uses elilo.conf)The discussion point is elilo.conf path.
I use "/efi/redhat/elilo.conf"
But this is distributer specific(for example Redhat). Is any idea to fix this issue?grubfile = None
for f in ("/boot/grub/menu.lst", "/boot/grub/grub.conf",
tools/pygrub/src/pygrub Tue Apr 10 20:30:05 2007 +0900 class Grub: · line 372
Quoted 3 lines
tools/pygrub/src/pygrub Tue Apr 10 20:30:05 2007 +0900 renamed from tools/pygrub/src/pygrub Mon Apr 09 13:40:25 2007 -0600 +2
-1- "/grub/menu.lst", "/grub/grub.conf"): + "/grub/menu.lst", "/grub/grub.conf", + "/efi/redhat/elilo.conf"):
This is a search path, so rather than favoring one distribution, at a
minimum, I think we need to include a reasonable sampling of distributions. Therefore, I'd add /efi/debian/elilo.conf and /efi/SuSE/elilo.conf. We should probably add RedFlag too, but I've never tried it to know what their elilo path is. I'd guess it's just "/efi/redflag/elilo.conf". Ubuntu also has an unofficial ia64 port, but I believe they use the same path as Debian. This obviously isn't the optimal solution, but we should try for some fairness.
Keir, all 3 of these patches are touching common code, so I'll leave
it to you to check these directly into xen-unstable.hg. Getting pygrub working on ia64 would be a really nice feature to have for 3.0.5, so please consider these before the fork. Thanks,
Alex
Signature · 1 line
Alex Williamson HP Open Source & Linux Org.
Quoted 20 lines · Alex Williamson
Quoted 15 lines · Takahashi Tomohiro
Hi,
I made a patch that fixed pygrub for IA64 support.
This patch purposes to support pygrub on IA64. I just do fix pygrub and add
LiloConf.py. (since IA64 uses elilo.conf)The discussion point is elilo.conf path.
I use "/efi/redhat/elilo.conf"
But this is distributer specific(for example Redhat). Is any idea to fix this issue?grubfile = None
for f in ("/boot/grub/menu.lst", "/boot/grub/grub.conf",tools/pygrub/src/pygrub Tue Apr 10 20:30:05 2007 +0900 class Grub: · line 372
Quoted 3 lines
tools/pygrub/src/pygrub Tue Apr 10 20:30:05 2007 +0900 renamed from tools/pygrub/src/pygrub Mon Apr 09 13:40:25 2007 -0600 +2
-1- "/grub/menu.lst", "/grub/grub.conf"): + "/grub/menu.lst", "/grub/grub.conf", + "/efi/redhat/elilo.conf"):
Quoted 8 lines
This is a search path, so rather than favoring one distribution, at a
minimum, I think we need to include a reasonable sampling of distributions. Therefore, I'd add /efi/debian/elilo.conf and /efi/SuSE/elilo.conf. We should probably add RedFlag too, but I've never tried it to know what their elilo path is. I'd guess it's just "/efi/redflag/elilo.conf". Ubuntu also has an unofficial ia64 port, but I believe they use the same path as Debian. This obviously isn't the optimal solution, but we should try for some fairness.
Oops, I forgot gentoo. I'd guess they use /efi/gentoo/elilo.conf.
Alex
Quoted 7 lines
Keir, all 3 of these patches are touching common code, so I'll leave
it to you to check these directly into xen-unstable.hg. Getting pygrub working on ia64 would be a really nice feature to have for 3.0.5, so please consider these before the fork. Thanks,Alex
Signature · 1 line
Alex Williamson HP Open Source & Linux Org.