xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* pygrub fails with NameError: name 'fs' is not defined
@ 2014-05-10  0:12 Sven Köhler
  2014-05-10  0:23 ` Sven Köhler
  2014-05-10  1:18 ` [PATCH] tools/pygrub: Fix error handling if no valid partitions are found Andrew Cooper
  0 siblings, 2 replies; 5+ messages in thread
From: Sven Köhler @ 2014-05-10  0:12 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-22 15:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-10  0:12 pygrub fails with NameError: name 'fs' is not defined Sven Köhler
2014-05-10  0:23 ` 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

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).