Hal Finkel
2010-Oct-06 04:01 UTC
[Pkg-xen-devel] Bug#599243: xen-utils-4.0: pygrub does not understand grub2 partition types (e.g. (hd0, msdos1) instead of (hd0, 1))
Package: xen-utils-4.0
Version: 4.0.1-1
Severity: normal
Tags: patch
pygrub could not boot a newly-updated Debian/testing domU with a non-chained
grub2. The traceback was:
Using <class 'grub.GrubConf.Grub2ConfigFile'> to parse
/grub/grub.cfg
WARNING:root:Unknown directive load_video
WARNING:root:Unknown directive terminal_output
Traceback (most recent call last):
File "/usr/lib/xen-4.0/bin/pygrub", line 669, in <module>
chosencfg = run_grub(file, entry, fs, incfg["args"])
File "/usr/lib/xen-4.0/bin/pygrub", line 549, in run_grub
g = Grub(file, fs)
File "/usr/lib/xen-4.0/bin/pygrub", line 205, in __init__
self.read_config(file, fs)
File "/usr/lib/xen-4.0/bin/pygrub", line 413, in read_config
self.cf.parse(buf)
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 400, in
parse
self.add_image(Grub2Image(title, img))
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 316, in
__init__
_GrubImage.__init__(self, title, lines)
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 85, in
__init__
self.reset(lines)
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 101, in
reset
self._parse(lines)
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 96, in
_parse
map(self.set_from_line, lines)
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 326, in
set_from_line
setattr(self, self.commands[com], arg.strip())
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 104, in
set_root
self._root = GrubDiskPart(val)
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 55, in
__init__
(self.disk, self.part) = str.split(",", 2)
File "/usr/lib/xen-4.0/lib/python/grub/GrubConf.py", line 80, in
set_part
self._part = int(val)
ValueError: invalid literal for int() with base 10: 'msdos1'
Newer versions of grub2 support the use of named partition types (such as
msdos1),
and pygrub needs to deal with these (since the Debian scripts now generate
device
specifications with named partition types).
A simple way to fix this, at least for msdos partitions, is:
--- GrubConf.py.orig 2010-08-29 11:13:20.000000000 -0400
+++ GrubConf.py 2010-10-05 23:27:57.000000000 -0400
@@ -76,7 +76,7 @@
if val is None:
self._part = val
return
- val = val.replace("(", "").replace(")",
"")
+ val = val.replace("(", "").replace(")",
"").replace("msdos", "")
self._part = int(val)
part = property(get_part, set_part)
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages xen-utils-4.0 depends on:
ii e2fslibs 1.41.12-2 ext2/ext3/ext4 file system librari
ii iproute 20100519-3 networking and traffic control too
ii libc6 2.11.2-6 Embedded GNU C Library: Shared lib
ii libncurses5 5.7+20100313-4 shared libraries for terminal hand
ii libxenstore3.0 4.0.1-1 Xenstore communications library fo
ii python-support 1.0.10 automated rebuilding support for P
ii python2.5 2.5.5-8 An interactive high-level object-o
ii udev 160-1 /dev/ and hotplug management daemo
ii xen-utils-common 4.0.0-1 XEN administrative tools - common
ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime
Versions of packages xen-utils-4.0 recommends:
ii bridge-utils 1.4-5 Utilities for configuring the Linu
ii xen-hypervisor-4.0-amd64 [xen 4.0.1-1 The Xen Hypervisor on AMD64
Versions of packages xen-utils-4.0 suggests:
pn xen-docs-4.0 <none> (no description available)
-- no debconf information
Debian Bug Tracking System
2011-Jan-12 14:51 UTC
[Pkg-xen-devel] Bug#599243: marked as done (xen-utils-4.0: pygrub does not understand grub2 partition types (e.g. (hd0, msdos1) instead of (hd0, 1)))
Your message dated Wed, 12 Jan 2011 14:49:40 +0000 with message-id <E1Pd216-0000zz-63 at franck.debian.org> and subject line Bug#599243: fixed in xen 4.0.1-2 has caused the Debian Bug report #599243, regarding xen-utils-4.0: pygrub does not understand grub2 partition types (e.g. (hd0, msdos1) instead of (hd0, 1)) to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 599243: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599243 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Hal Finkel <half at halssoftware.com> Subject: xen-utils-4.0: pygrub does not understand grub2 partition types (e.g. (hd0, msdos1) instead of (hd0, 1)) Date: Wed, 06 Oct 2010 00:01:28 -0400 Size: 5607 URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20110112/6f2eb10a/attachment-0002.eml> -------------- next part -------------- An embedded message was scrubbed... From: Bastian Blank <waldi at debian.org> Subject: Bug#599243: fixed in xen 4.0.1-2 Date: Wed, 12 Jan 2011 14:49:40 +0000 Size: 7502 URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20110112/6f2eb10a/attachment-0003.eml>
Possibly Parallel Threads
- Bug#603391: pygrub: unintelligible error messages
- Bug#599243: xen-utils-4.0: pygrub does not understand grub2 partition types (e.g. (hd0, msdos1) instead of (hd0, 1))
- Bug#643953: xen-utils-4.0: pygrub can not parse empty "root" statement in menu.lst
- Bug#603391: Workaround PyGrub issue
- Bug#603391: Bug#603391: Workaround PyGrub issue