8

I'm trying to understand which FAT based filesystems my Real Time 2.6 Linux supports. I have tried 3 things:

  1. /proc/filesystems shows vfat among others non-relevant for the question (like ext2, etc)

  2. /proc/config.gz shows:

    # DOS/FAT/NT Filesystems
    #
    CONFIG_FAT_FS=y
    CONFIG_MSDOS_FS=y
    CONFIG_VFAT_FS=y
    CONFIG_FAT_DEFAULT_CODEPAGE=437
    CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
    # CONFIG_NTFS_FS is not set
    
  3. Commands like ls /lib/modules/$(uname -r)/kernel/fs show nothing as .../fs folder doesn't exist.

So, looking at this, is safe to asume that FAT and VFAT are supported, but what about FAT32 or exFAT? It's not explicitly specified. How can I know?

muru
  • 69,900
  • 13
  • 192
  • 292
Héctor
  • 248
  • 2
  • 9
  • 1
    Have you perhaps run an upgrade on your system but have not rebooted? It is odd that `/lib/modules/$(uname -r)/kernel/fs` doesn't exist. Does `/lib/modules/$(uname -r)/` exist? If not, maybe you've updated your kernel but haven't rebooted into the new one yet. – terdon Jul 30 '21 at 08:50
  • `/lib/modules/$(uname -r)/` exists. `/lib/modules/$(uname -r)/kernel` also exists. `/lib/modules/$(uname -r)/kernel/fs` doesn't. No kernel update. – Héctor Jul 30 '21 at 08:58
  • 1
    @terdon the configuration options are set to “y”, so the drivers are built-in, not modules. – Stephen Kitt Jul 30 '21 at 08:58
  • Huh. Then I'm stumped. I got a "doesn't exist" error on `ls /lib/modules/$(uname -r)/kernel/fs` and noticed that my `uname -r` dir didn't exist because of said update and lack of reboot so I thought you might have something similar. I do have the `fs` subfolder under the newer kernel version I've installed. – terdon Jul 30 '21 at 08:59
  • @StephenKitt some are set to `y`, so presumably some are there as modules. Or does the lack of an `modules/.../fs` subdir mean no filesystem modules are present and the installed kernel only supports what is built in? – terdon Jul 30 '21 at 09:01
  • 1
    @terdon I don’t follow why having some set to “y” implies that some are configured as modules... – Stephen Kitt Jul 30 '21 at 09:06
  • 2
    @StephenKitt you don't follow because I am not making myself clear :) I meant _some_ are set to `y`, so won't be present as modules but have been compiled into the kernel, but others are not mentioned at all, so I thought that might suggest they'd be modules. I have since realized that if that were the case, they'd be present but set to `m` instead. – terdon Jul 30 '21 at 09:21

1 Answers1

7

The FAT drivers include support for FAT32; it’s treated as a variant along with FAT12 and FAT16. If you see vfat in /proc/filesystems, then FAT32 is supported.

exFAT is supported, in recent kernels, by a specific exFAT driver, with its own configuration option (EXFAT_FS). It’s listed separately in /proc/filesystems.

exFAT support is also available as a FUSE exFAT driver.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
  • 2
    Thanks for your reply. How could now a newbie that `vfat` refers to FAT, VFAT & FAT32? There is some doc where he could find it? Or it's something that is taken for granted. – Héctor Jul 30 '21 at 09:20
  • 2
    It’s not all that obvious... [`man mkfs.vfat`](https://man7.org/linux/man-pages/man8/mkfs.vfat.8.html) mentions it in passing, I’m looking for anything more specific. – Stephen Kitt Jul 30 '21 at 09:32
  • 1
    exFAT may also be supported by [a FUSE driver](https://github.com/relan/exfat), which is much more likely to be usable on a 2.6 system. – chrylis -cautiouslyoptimistic- Jul 30 '21 at 18:25
  • Ah yes, thanks @chrylis! – Stephen Kitt Jul 30 '21 at 19:40
  • I have discovered that my device supports exFAT. How? It has a FUSE driver? How can I know? lsmod returns anything. How can I know what is giving me the ability to read the exFAT fs? – Héctor Aug 04 '21 at 08:17
  • @Héctor what does `mount` show for an exFAT file system when it’s mounted? – Stephen Kitt Aug 04 '21 at 08:22
  • I'm not sure if I'm understanding you correctly. The USB it's automatically mount when plugged in. – Héctor Aug 04 '21 at 08:27
  • Yes, and I’m asking what `mount` shows for the mount point after it’s automatically mounted. – Stephen Kitt Aug 04 '21 at 08:29
  • Nothing, it doesn't appears. It's detected as sda1 and mounted in /media/usb automatically, but `mount` doesn't show it – Héctor Aug 04 '21 at 08:38
  • That’s surprising, on recent-ish kernels at least (4.19) FUSE mount points show up in `mount`, with a `fuse.` prefix for the mount type... Do the kernel logs show anything? (`dmesg`) – Stephen Kitt Aug 04 '21 at 08:45
  • It's a 2.6 kernel, and I don't see anythng about exfat in the dmesg. Only logs of the system recognizing the usb but nothing about fat or exfat. – Héctor Aug 04 '21 at 09:20
  • 2.6 kernel was released in 2004 and was out of support for more than a decade, why do you still use it? Obviously there's no exFAT kernel driver support in 2.6 because it's only available since kernel 5.7. If exFAT is supported then it must be via FUSE – phuclv Sep 03 '22 at 08:04