All of lore.kernel.org
 help / color / mirror / Atom feed
From: aq <aquynh@gmail.com>
To: Hollis Blanchard <hollisb@us.ibm.com>
Cc: Mark Williamson <mark.williamson.mark.williamson@cl.cam.ac.uk>,
	xen-devel@lists.xensource.com
Subject: Re: [PATCH] Guest boot loader support
Date: Wed, 27 Apr 2005 05:49:44 +0900	[thread overview]
Message-ID: <9cde8bff050426134949732dd0@mail.gmail.com> (raw)
In-Reply-To: <426EA37E.5070102@us.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

On 4/27/05, Hollis Blanchard <hollisb@us.ibm.com> wrote:
> Mark Williamson wrote:
> >>ok, i see the point.
> >>
> >>other question: pygrub::get_config(fn) tries to read
> >>"/boot/grub/grub.conf". Normally this should be "/boot/grub/menu.lst".
> >>I wonder which distro are you working on?
> >
> > My FC3 box has menu.lst as a symlink to grub.conf.  Grub seems to be happy
> > with either of these names.  Painful experience suggests that if both files
> > are present, then "menu.lst" will "win".
> 
> GRUB only looks for menu.lst; distros create symlinks because that's a
> terrible name for a config file. In other words, no code should be
> opening grub.conf...
> 

ok, so here is a quick patch to fix the "/boot/grub/grub.conf"
problem. Please apply this after applying the last Jeremy's patch.

list of changes:
- make a dummy file tools/pygrub/src/__init__.py
- open and parse /boot/grub/menu.lst instead of /boot/grub/grub.conf

$ diffstat xen-bootloader.aq.patch 
 __init__.py |    1 +
 pygrub      |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>

[-- Attachment #2: xen-bootloader.aq.patch --]
[-- Type: application/octet-stream, Size: 1245 bytes --]

diff -Nurp xen-unstable.27.3.org/tools/pygrub/src/__init__.py xen-unstable.27.3/tools/pygrub/src/__init__.py
--- xen-unstable.27.3.org/tools/pygrub/src/__init__.py	1970-01-01 09:00:00.000000000 +0900
+++ xen-unstable.27.3/tools/pygrub/src/__init__.py	2005-04-27 04:50:12.000000000 +0900
@@ -0,0 +1 @@
+ 
diff -Nurp xen-unstable.27.3.org/tools/pygrub/src/pygrub xen-unstable.27.3/tools/pygrub/src/pygrub
--- xen-unstable.27.3.org/tools/pygrub/src/pygrub	2005-04-27 05:32:43.000000000 +0900
+++ xen-unstable.27.3/tools/pygrub/src/pygrub	2005-04-27 05:43:48.000000000 +0900
@@ -13,7 +13,7 @@
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #
 
-import os, sys, string, struct, tempfile
+import os, os.path, sys, string, struct, tempfile
 import logging
 
 import curses, _curses, curses.wrapper
@@ -97,7 +97,10 @@ def get_config(fn):
             break
 
     if fs is not None:
-        f = fs.open_file("/boot/grub/grub.conf")
+        if not os.path.isfile("/boot/grub/menu.lst"):
+            raise RuntimeError, "we cannot find /boot/grub/menu.lst" + \
+                                "in the image provided. halt!"
+        f = fs.open_file("/boot/grub/menu.lst")
         buf = f.read()
         f.close()
         fs.close()

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

  parent reply	other threads:[~2005-04-26 20:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-25 22:50 [PATCH] Guest boot loader support Jeremy Katz
2005-04-26  9:32 ` aq
2005-04-26  9:54   ` aq
2005-04-26 17:01   ` Jeremy Katz
2005-04-26 19:37     ` aq
2005-04-26 19:48       ` Mark Williamson
2005-04-26 20:24         ` Hollis Blanchard
2005-04-26 20:47           ` Mark Williamson
2005-04-26 21:02             ` aq
2005-04-27  0:30               ` Mark Williamson
2005-04-27  3:14                 ` aq
2005-04-29  3:06             ` Jeremy Katz
2005-04-26 20:49           ` aq [this message]
2005-04-26 19:58     ` aq
2005-04-26 20:11 ` Jacob Gorm Hansen
2005-04-26 20:21   ` Anthony Liguori
2005-04-26 20:39     ` Jacob Gorm Hansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9cde8bff050426134949732dd0@mail.gmail.com \
    --to=aquynh@gmail.com \
    --cc=hollisb@us.ibm.com \
    --cc=mark.williamson.mark.williamson@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.