Commit Graph
58 Commits
Author SHA1 Message Date
Keir Fraser 63193f3f4d PyGRUB: fix menu flicker
To avoid flickers, PyGRUB has to avoid spurious ncurses refresh as
much as possible, in particular before the complete screen is drawn,
and eventually call doupdate last.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-27 09:46:38 +01:00
Keir Fraser 1a1af72f08 pygrub: Add 64bit library path to pygrub default search path.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-07-30 09:23:47 +01:00
Keir Fraser 622e368758 Add ZFS libfsimage support patch
Add support to pygrub and libfsimage to boot ZFS root filesystems.
Boot argument of zfs-bootfs is set to describe ZFS root pool and
boot filesystem object number.  Boot argument bootpath is set to
describe the virtual device root mirror components.

Signed-off-by: Susan Kamm-Worrell <susan.kamm-worrell@sun.com>
2008-05-01 16:38:56 +01:00
Keir Fraser 8d4aef298f pygrub: cleanup and support for NetBSD
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-03-26 14:41:47 +00:00
Keir Fraser dc5719607e Fix pygrub handling of many kernels
If there are a large number of kernel images configured in grub.conf
there will be too many to fit in the limited size pygrub display. This
patch fixes this so that the list of kernels scrolls as needed.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-12-27 12:56:32 +00:00
Keir Fraser adbda3b6da Fix security vulnerability CVE-2007-4993.
Protect pygrub from possible malicious content in guest grub
config file.  This fixes CVE-2007-4993.  Original patch from
Jeremy Katz, I updated to close 2 remaining issues pointed out
by Christian and Keir, and to use setattr(self, ...).

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2007-09-25 09:34:36 +01:00
kfraser@localhost.localdomain f26a3dbc36 pygrub: LiloConf.py supports root and read-only
LiloConf.py ignores the following options: root and read-only.
This patch fixes the issue.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2007-08-06 10:13:34 +01:00
kfraser@localhost.localdomain 320061b18e [IA64] Presently pygrub only looks in /efi/redhat/elilo.conf. It
should check for other distributions, plus a couple fallback
locations.

Signed-off-by: Aron Griffis <aron@hp.com>
2007-05-03 09:33:12 +01:00
kfraser@localhost.localdomain 5e0ae4b087 pygriub: Fix GPT support.
- 64 bit support for starting of a GPT partition.
- detect partition types precisely.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2007-04-13 11:23:26 +01:00
kfraser@localhost.localdomain 29f97ec479 Fix pygrub for IA64 support.
Signed-off-by: Shinya Kuwamura <kuwa@jp.fujitsu.com>
Signed-off-by: Tomohiro Takahashi <takatom@jp.fujitsu.com>
2007-04-11 15:36:04 +01:00
kfraser@localhost.localdomain a6954d648b pygrub: Support GPT (GUID Partition Table) as used by EFI.
Signed-off-by: Shinya Kuwamura <kuwa@jp.fujitsu.com>
Signed-off-by: Tomohiro Takahashi <takatom@jp.fujitsu.com>
2007-04-11 15:27:14 +01:00
Tim Deegan d3454d2db9 Editing long lines in pygrub interactively could lead to tracebacks.
Attached patch fixes things.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2007-03-28 09:12:16 +00:00
kfraser@localhost.localdomain 9de4f0c67d tools: Clean up use of 'install' command.
- convert raw "install" command to use $(INSTALL)
- convert some $(INSTALL) to $(INSTALL_DATA) as appropriate
- modify the specific $(INSTALL) definitions to use -p.

Original patch by Ben Thomas <ben@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-07 10:49:20 +00:00
kfraser@localhost.localdomain 6ad77059f1 Install pygrub according to auxbin rules.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-05 19:01:19 +00:00
john.levon@sun.com ec08a094b2 Filesystem implementations may need optional arguments in terms of
what to mount. Add an options string to the libfsimage API.

Signed-off-by: John Levon <john.levon@sun.com>
2007-02-19 20:44:42 -08:00
Tim Deegan 479f9c8a5d [PYGRUB] Invoke pygrub with TERM=vt100
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-02-01 15:03:37 +00:00
Keir Fraser 880562ad8b pygrub: fsimage binding must free objects with PyObject_DEL, not PyMem_DEL.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-01-30 17:50:39 +00:00
Tim Deegan 7f39243d68 [PYGRUB] Plumb bootloader I/O through xenconsole.
- xend forwards console traffic between the running bootloader and a pty
   which it writes to the store so the xenconsole client can see it.
 - the xenconsole client handles the domain's console pty changing.
 - xm create no longer runs the bootloader.
 - pygrub gets '-i' option to explicitly request an interactive session.
 - xend unlocks the domain list during bootloading so that "xm console"
   can see the domain and attach to its console pty.

Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-01-22 11:49:14 +00:00
Tim Deegan 5ba43a5774 [PYGRUB] Don't redraw the interactive menu screen if it doesn't need it.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-01-22 11:49:05 +00:00
john.levon@sun.com e34a812b5d Update pygrub for new Solaris directory names.
Signed-off-by: John Levon <john.levon@sun.com>
2007-01-18 18:19:54 -08:00
Tim Deegan d50a0b66da [PYGRUB] Make the boot-choice timeout actually time out.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-01-15 16:04:32 +00:00
kfraser@localhost.localdomain ce9e6668ac Parse Solaris VTOCs in pygrub.
Signed-off-by: John Levon <john.levon@sun.com>
2007-01-12 14:42:07 +00:00
Tim Deegan 9c9e43e5f0 Sniff for Solaris if not specified. This allows Solaris domU's to automatically
boot correctly without fiddling with domain configs.

Signed-off-by: John Levon <john.levon@sun.com>
2007-01-09 13:24:41 +00:00
Tim Deegan 8c119d2ee4 Pass in kernel/ramdisk settings to pygrub; if specified, don't try to use
grub.conf; this allows hands-off bootloading in the absence of a grub.conf.
It's also useful for specifying temporary changes etc.

Signed-off-by: John Levon <john.levon@sun.com>
2007-01-09 13:24:40 +00:00
kaf24@localhost.localdomain 5334214feb pygrub tmp files should live in /var/run/ not /var/lib/, as they are
indeed runtime only.

Also fix a race condition in making the pygrub fifo.

Signed-off-by: John Levon <john.levon@sun.com>
2006-12-09 15:04:27 +00:00
Tim Deegan 6f88f21ddc [PYGRUB] Fix a few bounds violations in pygrub's command-line editor.
Don't step off the end of the line, or delete characters that aren't there.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2006-11-09 14:23:24 +00:00
Tim Deegan 0d58f56d57 Use libfsimage for reading filesystem images.
Signed-off-by: John Levon <john.levon@sun.com>
2006-11-09 14:11:11 +00:00
kfraser@localhost.localdomain a034a6ad0e Dynamically link to libgcc on Solaris. Also clean up duplicate -Wall flags.
Signed-off-by: John Levon <john.levon@sun.com>
2006-11-02 18:19:22 +00:00
kaf24@localhost.localdomain a12c7da3a8 Use $CC when building pygrub.
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-22 17:36:28 +01:00
kfraser@localhost.localdomain e32782e508 [PYGRUB] Enable showing the cursor in pygrub when it's relevant to do so.
Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-09-29 11:22:24 +01:00
Tim Deegan d456d49ce6 Pygrub: add /var/lib/xen to the install tree.
(Pygrub uses /var/lib/xen to store fifos and image files.)
Signed-off-by: Tim Deegan <tim.deegan@xensource.com>
2006-09-21 14:56:28 +01:00
Tim Deegan 795a172334 Pygrub: stop the FS identification code from leaking open fds.
Signed-off-by: Tim Deegan <tim.deegn@xensource.com>
2006-09-21 14:55:02 +01:00
kaf24@firebug.cl.cam.ac.uk a3c844bd07 [PYGRUB] Flesh out some of pygrub's functionality as was originally
intended. Changes include:
 * Addition of basic command line mode much like grub's so that you can
   boot things without having them specified in the config file
 * Edit/append mode for modifying kernel command lines, etc
 * Fix handling of case where the grub config didn't have a default
   specified

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-08-08 09:30:11 +01:00
atse@norwich.uk.xensource.com 6d86274262 [PYGRUB] Typo fix in pygrub README
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-07-14 11:49:26 +01:00
kaf24@firebug.cl.cam.ac.uk f9afb49240 Fix python installation on sles10. Install prefix is being
passed along for some reason, so we explicitly redefine it
to nothing.

Signed-off-by: Ryan Grimm <grimm@us.ibm.com>
2006-04-21 09:14:07 +01:00
kaf24@firebug.cl.cam.ac.uk b5fa90ac8e build: Clean up use of .PHONY
* Move .PHONY directives next to targets,
  this makes them a lot harder to miss
* Add missing .PHONY directives
* Remove nonexistent .PHONY directives
* Hopefully I didn'T miss anything...

Signed-Off-By: Horms <horms@verge.net.au>
2006-04-10 17:02:49 +01:00
kaf24@firebug.cl.cam.ac.uk 0198288b1f build: Clean pygrub's a.out
Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
Signed-Off-By: Horms <horms@valinux.co.jp>
2006-04-10 16:36:38 +01:00
emellor@leeni.uk.xensource.com 02e0e0d9bb Initialise offsetopt when offset == 0. Closes bug #599.
Report and diagnosis by Robert Hendrickx <robert.hendrickx@advalvas.be>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-10 16:28:52 +01:00
mip@xencore04.1virtual.net ea0ce2d439 Improve pygrub error reporting when opening ext2 fs is not possible
As reported in the thread:
http://lists.xensource.com/archives/html/xen-users/2006-03/msg00721.html,
pygrub does not open ext2 file systems in partitioned images or sub
partitions on e.g. CentOS/RHEL 4, because e2fsprogs ext2fs_open does not
support an offset into the file to be opened.

With this patch, the error is correctly reported instead of a generic
"unable to open file" (and leaving the user searching in the dark).

Signed-off-by: Michael Paesold <mpaesold@gmx.at>
2006-04-03 18:28:54 +01:00
kaf24@firebug.cl.cam.ac.uk b3a1978719 pygrub currently takes a file on the command line to mean a config file
if it can't figure out partitions and filesystems.  This then makes it
balloon to absurd sizes.  Make this only happen if you pass a debugging
flag

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-02-26 10:54:06 +01:00
john.levon@sun.com a7c8d79dcf Fix pygrub to handle timeout of -1 (wait forever).
Only call use_default_colors() if it's available.

Signed-off-by: John Levon <john.levon@sun.com>
2006-02-07 20:46:13 +00:00
kaf24@firebug.cl.cam.ac.uk 07ac741579 Fix some more bugs in pygrub including:
a) a couple of variables were referenced wrong
b) fix using arrow keys in the menu to act correctly
c) and look for grub config properly for /boot partition

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-11-10 12:01:15 +01:00
kaf24@firebug.cl.cam.ac.uk b63ab24496 Attached patch fixes a thinko in pygrub's setup.py
Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-11-10 11:59:49 +01:00
kaf24@firebug.cl.cam.ac.uk 44d95809c5 Two patches were applied to pygrub's setup.py to work around python2.2
limitations and only one is needed. Revert one of them.

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
2005-10-22 07:35:36 +01:00
kaf24@firebug.cl.cam.ac.uk 7ebcb094f9 Tweak to pygrub build config detection.
Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-21 18:19:38 +01:00
kaf24@firebug.cl.cam.ac.uk 4308423bdd pygrub's setup.py relies on distutils.UnixCCompiler.has_function(),
which does not exist with python2.2, causing the following build
error:

make[2]: Entering directory `/home/muli/xen/x86.hg/tools/pygrub'
CFLAGS=" -m32 -march=i686" python setup.py build
Traceback (most recent call last):
  File "setup.py", line 15, in ?
    if cc.has_function("ext2fs_open2"):
AttributeError: UnixCCompiler instance has no attribute 'has_function'

The following patch gets it to build, but is pretty ugly. A proper fix
would be to do the check for ext2fs_open2() in a way that is backward
compatible with python2.2.

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
2005-10-19 16:07:11 +01:00
kaf24@firebug.cl.cam.ac.uk 3bf766cdf1 Better cast for ptr->int in residerfs module.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 11:13:00 +01:00
kaf24@firebug.cl.cam.ac.uk 167d80d0f2 Fix 64-bit compile of pygrub. From Charles Duffy. 2005-10-11 10:03:54 +01:00
kaf24@firebug.cl.cam.ac.uk 635fd50b51 Re-enable the pygrub build and fix the build with older
e2fsprogs (tested on RHEL4 with e2fsprogs-1.35 and rawhide
with e2fsprogs-1.38)

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 23:21:23 +01:00
smh22@firebug.cl.cam.ac.uk b9ca214b2d Disable build of pygrub for now - does not build with e2fsprogs-1.35
Signed-off-by: Steven Hand <steven@xensource.com>
2005-08-02 11:34:38 +00:00