Re: [Libguestfs] 【help】why not support showing filename containing chinese characters with the ls function?
On Tue, May 22, 2012 at 11:08 PM, 马磊 <aware.why@gmail.com> wrote:
On Tue, May 22, 2012 at 7:48 PM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Tue, May 22, 2012 at 7:37 PM, Richard W.M. Jones <rjones@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
On Tue, May 22, 2012 at 07:44:04PM +0800, 马磊 wrote: 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)
On Tue, May 22, 2012 at 11:19:40PM +0800, 马磊 wrote:
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)
I'm guessing that the error message is wrong. It probably means that the "utf8" mount option isn't recognized. Compare: $ guestfish --ro -a /dev/vg_pin/F16x64 -m /dev/vda2:/ 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> exit
with this: $ guestfish --ro -a /dev/vg_pin/F16x64 -m /dev/vda2:/:blahblah libguestfs: error: mount_options: /dev/vda2 on /: mount: wrong fs type, bad option, bad superblock on /dev/vda2, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so guestfish: '/dev/vda2' could not be mounted. Did you mean one of these? /dev/sda1 (unknown) /dev/sda2 (ext4) /dev/vg_f16x64/lv_root (ext4) /dev/vg_f16x64/lv_swap (swap) I've filed a bug: https://bugzilla.redhat.com/show_bug.cgi?id=824043 (Sixth bug filed today, it must be some sort of record!) 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
participants (2)
-
Richard W.M. Jones -
马磊