From: "Sven Köhler" <sven.koehler@gmail.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: pygrub fails with NameError: name 'fs' is not defined
Date: Sat, 10 May 2014 03:12:34 +0300 [thread overview]
Message-ID: <536D6EF2.9020603@gmail.com> (raw)
Hi,
I get this rather puzzling error:
Traceback (most recent call last):
File "/usr/lib64/xen/bin/pygrub", line 885, in <module>
if not fs:
NameError: name 'fs' is not defined
This is pygrub from xen-tools 4.4.0.
I found a rather old thread about the same issue:
http://old-list-archives.xenproject.org/xen-devel/2011-01/msg02076.html
But it seems like the problem has already been fixed and indeed there
are some similarities, namely that /dev/md4 (which is xvda1 in the domU)
does not contain a partition table.
Now the issue here seems to be that boot sector of /dev/md4 is a little
screwed up. Namely, fdisk -l /dev/md4 seems to report an empty partition
table. This is not the case for other domU I have. Maybe, the
boot-sector is to MBR like after running grub-install /dev/xvda1 inside
the domU. Or maybe after trying LILO. I don't know.
Anyhow, the error above seems like a programming mistake (variable fs is
not defined? Sorry, I don't know python). So I'm hereby reporting it.
Maybe I will switch to a partitioned /dev/xvda instead of providing
/dev/xvda1 directly to the domU.
Has there been any improvement regarding pygrub for the case of
unpartitioned disks? It seems like it would be easy to support that case
more reliably if xl would pass some more information to pygrub. However,
in the thread from the archive, Ian made it sound like that would be
complicated. (In fact, if pygrub would know that the device name was
xvda1 and not xvda it could stop looking for a partition table).
Regards,
Sven
next reply other threads:[~2014-05-10 0:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-10 0:12 Sven Köhler [this message]
2014-05-10 0:23 ` pygrub fails with NameError: name 'fs' is not defined Sven Köhler
2014-05-10 1:18 ` [PATCH] tools/pygrub: Fix error handling if no valid partitions are found Andrew Cooper
2014-05-12 14:53 ` Ian Jackson
2014-05-22 15:50 ` Ian Jackson
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=536D6EF2.9020603@gmail.com \
--to=sven.koehler@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).