From: aq <aquynh@gmail.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 06:02:28 +0900 [thread overview]
Message-ID: <9cde8bff05042614022f7e8a8@mail.gmail.com> (raw)
In-Reply-To: <200504262147.56627.mark.williamson@cl.cam.ac.uk>
[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]
On 4/27/05, Mark Williamson <mark.williamson@cl.cam.ac.uk> wrote:
> > 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, I've investigated this using my sacrificial FC3 laptop ;-) I'd not fully
> investigated this before.
>
> Redhat's grub looks for grub.conf and not menu.lst. Standard grub looks for
> menu.lst.
>
> If the loader is to be flexible for different domU distros, it'd be nice to
> look for both, in one order or the other.
>
in that case, this patch is better for you, Mark ;-). Please apply
this on top of Jeremy's patch.
list of changes:
- make a dummy file tools/pygrub/src/__init__.py
- tools/src/pygrub looks for either /boot/grub/menu.lst or
/boot/grub/grub.conf, in that order.
$ diffstat xen-bootloader.aq2.patch
__init__.py | 1 +
pygrub | 11 +++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
[-- Attachment #2: xen-bootloader.aq2.patch --]
[-- Type: application/octet-stream, Size: 1403 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:57:43.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,14 @@ def get_config(fn):
break
if fs is not None:
- f = fs.open_file("/boot/grub/grub.conf")
+ if os.path.isfile("/boot/grub/menu.lst"):
+ grubfile = "/boot/grub/menu.lst"
+ elif os.path.isfile("/boot/grub/grub.conf"):
+ grubfile = "/boot/grub/grub.conf"
+ else:
+ raise RuntimeError, "we cannot find /boot/grub/{menu.lst,grub.conf} " + \
+ "in the image provided. halt!"
+ f = fs.open_file(grubfile)
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
next prev parent reply other threads:[~2005-04-26 21:02 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 [this message]
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
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=9cde8bff05042614022f7e8a8@mail.gmail.com \
--to=aquynh@gmail.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.