Description of problem: $ guestfish -N fs:vfat -m /dev/sda1 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> touch /马磊 libguestfs: error: touch: open: /马磊: Invalid argument ><fs> ll / total 20 drwxr-xr-x 2 root root 16384 Jan 1 1970 . drwxr-xr-x 23 500 500 4096 May 22 12:35 .. Version-Release number of selected component (if applicable): 1.18.0 How reproducible: 100% Steps to Reproduce: 1. See above.
The bug reporter sent me the disk image which fails (CA+ePHTDrJHi2z71s5+pZuBWEenBq9oCYuN+VuEhSRiYQFd4C6w.com) It is a vfat partition containing files with Chinese characters. When mounted without any options, these show up as "?". When mounted with the "utf8" mount option, these show up normally. ><fs> list-filesystems /dev/vda: vfat ><fs> mount /dev/vda / ><fs> ll / total 24 drwxr-xr-x 4 root root 4096 Jan 1 1970 . drwxr-xr-x 23 500 500 4096 May 23 09:53 .. -rwxr-xr-x 1 root root 0 Nov 30 08:18 ?? ????.txt -rwxr-xr-x 1 root root 58 Nov 30 08:18 ?? ????.wav -rwxr-xr-x 1 root root 22 Nov 30 08:18 ?? WinRAR ZIP ????.zip drwxr-xr-x 6 root root 4096 Dec 12 10:03 root1 drwxr-xr-x 2 root root 4096 Dec 12 10:03 root2 ><fs> umount / ><fs> mount-options "utf8" /dev/vda / ><fs> ll / total 24 drwxr-xr-x 4 root root 4096 Jan 1 1970 . drwxr-xr-x 23 500 500 4096 May 23 09:53 .. drwxr-xr-x 6 root root 4096 Dec 12 10:03 root1 drwxr-xr-x 2 root root 4096 Dec 12 10:03 root2 -rwxr-xr-x 1 root root 22 Nov 30 08:18 新建 WinRAR ZIP 压缩文件.zip -rwxr-xr-x 1 root root 0 Nov 30 08:18 新建 文本文档.txt -rwxr-xr-x 1 root root 58 Nov 30 08:18 新建 波形声音.wav
This is essentially a design problem in the Linux kernel. I have however pushed a documentation fix and a new test upstream which should help: https://github.com/libguestfs/libguestfs/commit/6445bc5952efd47fb1aa0880d9038040551d72ed https://github.com/libguestfs/libguestfs/commit/8e8a5764293d1b6bc3dbfb9409722e4c13384aec