Commit Graph
44 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
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 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 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
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 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
smh22@firebug.cl.cam.ac.uk 024fb8a600 Fix typo in pygrub code 2005-08-02 11:27:58 +00:00
smh22@firebug.cl.cam.ac.uk a89e4d770c The attached patch adds the support that was only stubbed in to be able
to support having reading the boot loader config when you're using a
whole disk (eg, file:/root/disk.img,xvda,w) as opposed to just a
partition.

This reads the partition table in the MBR to find the active partition
and then passes that offset down into the filesystem reading code.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-08-02 09:31:47 +00:00
kaf24@firebug.cl.cam.ac.uk 02d1147de9 bitkeeper revision 1.1560 (4294fb66-WHHJCdXRRXp-4dTrGuiLw)
Trivial fix to email contact address.
2005-05-25 22:25:42 +00:00
kaf24@firebug.cl.cam.ac.uk 29a355e904 bitkeeper revision 1.1559 (4294fab4CMjRyJfuEBP1lUbAC6G9GA)
- pygrub/README provides information on packages needed to compile pygrub
- support reiserfs {2,3} filesystem
- dynamically build modules based on which filesystem libraries the
system has (proposed by Jeremy)
- pump up pygrub to version 0.2


Signed-off-by: Jeremy Katz <katzj@redhat.com>
Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
2005-05-25 22:22:44 +00:00
kaf24@firebug.cl.cam.ac.uk f68954f42a bitkeeper revision 1.1422 (4288fba11spwpuVeAcBTXmV1qAve_Q)
Fix 64-bit build of pygrub. From Jerone Young.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-05-16 19:59:29 +00:00
mjw@wray-m-3.hpl.hp.com 155209afda bitkeeper revision 1.1392 (4270eaf9Zx1D03KOAVKHY8tW-aANmg)
Apply Nguyen's patch:

- extend filesystem abstraction by adding file_exist() method. this
method is used to check for existent of a file given its name. now
ext2fs implements this method.
- pygrub opens and parses /boot/grub/menu.lst or /boot/grub/grub.conf,
in that order.
- add /usr/lib/python to system path (see pygrub). without this
change, pygrub cannot find grub python package.
- remove few blank lines

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
Signed-off-by: Mike Wray <mike.wray@hp.com>
2005-04-28 13:54:01 +00:00
mjw@wray-m-3.hpl.hp.com 51a9f171a5 bitkeeper revision 1.1327.2.13 (4270d6c35WpxFmhdkREjmSvk82s-Bg)
Merge Jeremy's pygrub bootloader patch.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
Signed-off-by: Mike Wray <mike.wray@hp.com>
2005-04-28 12:27:47 +00:00