USB FAT32 Auto-Mount Issue: Cyrillic Filenames Displaying as Question Marks

Hello,
When a USB flash drive with a FAT32 file system is automatically mounted through fstab in OpenWRT, Cyrillic file names (regardless of their length) are displayed as question marks when using the ls /mnt/sda1 command.

However, if I manually mount the drive using the command mount -t vfat /dev/sda1 /mnt/sda1 -o utf8, all files are displayed correctly.

Here's the fstab configuration I'm using:

config global
    option anon_swap '0'
    option anon_mount '1'
    option auto_swap '1'
    option auto_mount '1'
    option delay_root '5'
    option check_fs '0'

config mount
    option target '/mnt/sda1'
    option enabled '1'
    option options 'rw,sync,iocharset=utf8'

After the system boots and the drive is automatically mounted, the output of the mount command for this drive is:

/dev/sda1 on /mnt/sda1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

Interestingly, this output is identical even after manually mounting the drive. I am looking for insights into why Cyrillic characters are not displayed correctly in the automatic mount scenario and how to resolve this inconsistency between the automatic and manual mounting processes.

There is no issue with exFAT USB drives.

Any guidance or suggestions would be greatly appreciated.

Thank you in advance.

https://lore.kernel.org/all/20210808162453.1653-2-pali@kernel.org/

Thank you for pointing out the answer, this solved the problem! For me, the configuration file was located at /target/linux/generic/config-5.10.

Setting CONFIG_FAT_DEFAULT_UTF8=y solved the issue. Now automount works.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.