Nikita A Menkovich
2011-Apr-10 15:35 UTC
[Libguestfs] Error with part-add with bsd partition
Hello,I receive strange error><fs> part-init /dev/vda bsd ><fs> part-add /dev/vda primary 64 -1libguestfs: error: part_add: do_part_add: parted: /dev/vda: parted: invalid token: primary Error: Expecting a file system type. but><fs> part-init /dev/vda msdos ><fs> part-add /dev/vda primary 64 -1runs ok Log attached. -- Nikita A Menkovich http://libc6.org/ JID: menkovich at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: bsd.log Type: text/x-log Size: 39533 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20110410/25b1cd04/attachment.bin>
Richard W.M. Jones
2011-Apr-10 16:30 UTC
[Libguestfs] Error with part-add with bsd partition
On Sun, Apr 10, 2011 at 07:35:59PM +0400, Nikita A Menkovich wrote:> Hello,I receive strange error > > ><fs> part-init /dev/vda bsd > ><fs> part-add /dev/vda primary 64 -1 > libguestfs: error: part_add: do_part_add: parted: /dev/vda: parted: > invalid token: primary > Error: Expecting a file system type.Yes, this is basically a bug. A bug in parted in fact, but one which we shouldn't be exposing through the API. If you have a look here it'll become more clear: http://git.annexia.org/?p=libguestfs.git;a=blob;f=daemon/parted.c;h=068384ef51b5265fcbed892349e1729ab2da94db;hb=HEAD#l117 (particularly the comment at line 149). We intend to write a partition handling library which is not insane (ie. unlike parted/libparted). Unfortunately we haven't got around to it yet :-( Please file a bug in Bugzilla or send a patch if you can see an easy fix. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora