Freenas – mounting a FAT32 partition with the right charset to “the”

fat32truenas

I've just started off with FreeNAS and have got a bunch of data (300gb+) I need to get from a FAT32 partition which I need to shift to the FreeNAS ZFS partition.

FreeNAS has successfully mounted the FAT32 partition and can get to the contents, the only issue is that whever I try to do

mv, cp, tar

or

pax

to shift or create an archive of the files, it inevitably chokes on a file it finds with an odd character with an

Invalid argument

warning. The file name will be something like

foo?s bar.mp3

where the

?

will have been an apostrophe or such and FreeNAS doesn't understand it.

I understand I can mount the drive with a different charset to overcome this problem but can't find any reference to it online. Please could someone assist with the necessary arguments I need to use with mount and the syntax it takes, please. I can SSH to the box.

TIA

Best Answer

You can specify the charset to use for conversion at mount time. From man mount :

iocharset=value

Character set to use for converting between 8 bit characters and 16 bit Unicode characters. The default is iso8859-1. Long filenames are stored on disk in Unicode format.

Specify it in you fstab or through the -o switch if you're mounting the FS manually :

 mount -t vfat -o iocharset=<value> /dev/<xxx>