On Tue, May 22, 2012 at 7:48 PM, Richard W.M. Jones <rjones(a)redhat.com>wrote:
> On Tue, May 22, 2012 at 07:44:04PM +0800, 马磊 wrote:
> > On Tue, May 22, 2012 at 7:37 PM, Richard W.M. Jones <rjones(a)redhat.com
> >wrote:
> >
> > > On Tue, May 22, 2012 at 06:38:45PM +0800, 马磊 wrote:
> > > > [malei@xen-test2 ~]$ guestfish --rw -a /home/malei/d.img
> > > >
> > > > Welcome to guestfish, the libguestfs filesystem interactive shell
> for
> > > > editing virtual machine filesystems.
> > > >
> > > > Type: 'help' for help on commands
> > > > 'man' to read the manual
> > > > 'quit' to quit the shell
> > > >
> > > > ><fs> mount-options '' /dev/vda1 /
> > > > libguestfs: error: mount_options: call launch before using this
> function
> > > > (in guestfish, don't forget to use the 'run' command)
> > > > ><fs> launch
> > > > ><fs> mount-options '' /dev/vda1 /
> > > > ><fs> ls /
> > > > ?? ????.txt
> > > > ?? ????.wav
> > > > ?? WinRAR ZIP ????.zip
> > > > root1
> > > > root2
> > > > ><fs>
> > > > ===============================================
> > > > Does it have something to do with the LANG environment variable or
> the
> > > disk
> > > > img which is not bootable?
> > >
> > > I guess this is a FAT or VFAT image? (Try the 'list-filesystems'
> command).
> > >
> > > There are several bugs, they even prevent me from creating such an
> > > image to start with :-( I have filed these:
> > >
> > >
https://bugzilla.redhat.com/show_bug.cgi?id=823885
> > >
https://bugzilla.redhat.com/show_bug.cgi?id=823887
> > >
> > > How large is 'd.img'? Would it be possible for me to get a copy
of
> > > it, or of a similar image that fails in the same way?
> > >
> > > Rich.
> > >
> > > --
> > > Richard Jones, Virtualization Group, Red Hat
> > >
http://people.redhat.com/~rjones
> > > virt-p2v converts physical machines to virtual machines. Boot with a
> > > live CD or over the network (PXE) and turn machines into Xen guests.
> > >
http://et.redhat.com/~rjones/virt-p2v
> >
> >
> >
> >
> > You're right! The partition containg chinese-character-name files
> is
> > vfat filesystem.
> > [malei@xen-test2 ~]$ guestfish --rw -a /home/malei/d.img
> >
> > Welcome to guestfish, the libguestfs filesystem interactive shell for
> > editing virtual machine filesystems.
> >
> > Type: 'help' for help on commands
> > 'man' to read the manual
> > 'quit' to quit the shell
> >
> > ><fs> run
> > ><fs> list_filesystems
> > /dev/vda1: vfat
> > /dev/vda2: ntfs
> > /dev/vda3: ntfs
> > /dev/vda4: unknown
> > /dev/vda5: vfat
> > /dev/vda6: vfat
> > /dev/vda7: ntfs
> > ><fs> mount-options /dev/vda2 /
> > mount-options should have 3 parameter(s)
> > type 'help mount-options' for help on mount-options
> > ><fs> mount-options '' /dev/vda2 /
> > ><fs> ls /
> > System Volume Information
> > root1
> > root2
> > 新建 WinRAR ZIP 压缩文件.zip
> > 新建 文本文档.txt
> > 新建 波形声音.wav
>
> It'd be great if you could get me / point me to a vfat image that
> contains Chinese character filenames. One way (assuming this image
> does not contain sensitive data) is:
>
> guestfish --ro -a /home/malei/d.img
> ><fs> run
> ><fs> download /dev/vda1 - | xz --best > /tmp/vda1.img.xz
>
> and then send me the file /tmp/vda1.img.xz.
>
> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat
>
http://people.redhat.com/~rjones
> libguestfs lets you edit virtual machines. Supports shell scripting,
> bindings from many languages.
http://libguestfs.org
>
I have sent it to you, check please.
BTW, another problem about mount:
[malei@xen-test2 ~]$ guestfish --rw -a d.img -m /dev/vda1:/:utf8
libguestfs: error: mount_options: you must mount something on / first
guestfish: '/dev/vda1' could not be mounted. Did you mean one of these?
/dev/vda1 (vfat)
/dev/vda2 (ntfs)
/dev/vda3 (ntfs)
/dev/vda4 (unknown)
/dev/vda5 (vfat)
/dev/vda6 (vfat)
/dev/vda7 (ntfs)