Check whether FAT tools are available
In Fedora and Debian, udisks2
, which gnome-disk-utility
depends on, explicitly depends on dosfstools
, which provides mkfs.vfat
. But, dosfstools
is not required for udisks
in Gentoo and is optional in Arch Linux in the same way as ntfs-3g
is optional. In GNU Guix, dosfstools
are not installed by default and mkfs.vfat
is not available to UDisks, unless dosfstools
is explicitly added to the system profile, which is in the same manner as ntfs-3g
is not provided by default.5
GNOME Disks utility can be used without mkfs.vfat
to format thumbdrives in Ext4, which was my use case. But when I needed to format it in FAT, the utility just thrown the following error on me in a pop-up:
Error creating file system: Error spawning command-line `mkfs.vfat -l -n "'/dev/sdb": Failed to execute child process "mkfs.vfat" (No such file or directory) (g-exec-error-quark, 8) (udisks-error-quark, 0)
Instead, I would expect the respective option to be grayed out in the GUI, unless mkfs.vfat
is available, in the same way as the option to format the partition in NTFS is grayed out, unless mkfs.ntfs
is available. I was advised that there is already the mechanism to do it for NTFS. It would be great to implement a similar check for FAT. I guess, a regular user would need to resort to the system administrator in any case to configure the system for FAT when the underlying tool is not available, but that way the user would know that nothing is "broken" and "buggy" yet.
My gnome-disk-utility
is version 40.2 and UDisks is version 2.8.4.