Linux mount exfat filesystem

How to mount an exFAT drive on Linux

Question: I am trying to mount a USB flash drive which is formatted in exFAT on my Linux machine. But the mount command fails with the following error. How can I fix this error and mount the exFAT drive?

mount: /mnt: unknown filesystem type 'exfat'.

exFAT is a proprietary filesystem developed by Microsoft, which has been primarily used in Windows and many existing SD cards or USB drives. Compared to FAT32, exFAT offers many improvements in terms of file size limit (significant higher than FAT32’s 4GB limit), maximum disk size, maximum number of files, disk allocation performance, timestamp granularity, file name length, etc. Because of these enhancements and good compatibility with Windows and MacOS, exFAT has been used as a default filesystem for many existing high-capacity SD cards (e.g., SDXC) or USB flash drives.

On Linux, the support for exFAT has been available with a userspace implementation of exFAT filesystem, called fuse-exfat . The Linux kernel has incorporated native support for exFAT starting from version 5.4.

If you cannot mount an exFAT drive on your Linux system, this means that your kernel is lower than 5.4, and also that you do not have fuse-exfat installed.

In order to mount an exFAT drive on Linux with kernel lower than 5.4, you should install fuse-exfat on your Linux system as follows.

Install fuse-exfat on Linux

Install fuse-exfat on Ubuntu, Debian or Linux Mint

On Debian-based distributions, fuse-exfat is available as a package named exfat-fuse . Thus install exfat-fuse along with a set of exFAT utilities ( exfat-utils ):

$ sudo apt install exfat-fuse exfat-utils

Install fuse-exfat on CentOS 7

On CentOS 7, enable Nux Dextop and EPEL repositories, and then run:

$ sudo yum install fuse-exfat exfat-utils

Install fuse-exfat on CentOS 8

On CentOS 8, enable EPEL repository, and then use yum command:

$ sudo yum install fuse-exfat exfat-utils

Install fuse-exfat on Fedora

On Fedora, first enable rpmfusion-free repository, and then use the default package manager:

$ sudo dnf install fuse-exfat exfat-utils

Mount an exFAT Drive on Linux

After fuse-exfat is installed, you can go ahead and mount an exFAT drive using mount command. Here the exFAT drive is mapped to /dev/sda1 , and the drive is mounted to /mnt .

$ sudo mount -t exfat /dev/sda1 /mnt

Now verify that the mount is successful using mount and df commands:

/dev/sda1 on /mnt type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
/dev/sda1 fuseblk 62482048 2432 62479616 1% /mnt

Mount an exFAT Drive as Non-root User

In the above, an exFAT drive is mounted as the root, which means only the root has read/write access to the drive. If you want to mount it as a regular unprivileged user, you can specify your uid and gid at the time you mount the drive as follows.

Читайте также:  Обнаружена ошибка при попытке использовать указанное зеркало архива debian kali linux

First, identify your uid and gid with:

uid=1001(alice) gid=1001(alice) groups=1001(alice),130(libvirt)

Then specify uid and gid with mount command:

$ sudo mount -o rw,users,uid=1001,gid=1001,dmask=007,fmask=117 /dev/sda1 /mnt

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Источник

How to Mount and Use an exFAT Drive on Ubuntu Linux [Quick Tip]

Brief: This quick tutorial shows you how to enable exFAT file system support on Ubuntu and other Ubuntu-based Linux distributions. This way you won’t see any error while mounting exFAT drives on your system.

Problem mounting exFAT disk on Ubuntu

The other day, I tried to use an external USB key formatted in exFAT format that contained a file of around 10 GB in size. As soon as I plugged the USB key, my Ubuntu 16.04 throw an error complaining that it cannot mount unknown filesystem type ‘exfat’.

Fix exfat drive mount error on Ubuntu Linux

The exact error message was this:

Error mounting /dev/sdb1 at /media/abhishek/SHADI DATA: Command-line `mount -t “exfat” -o “uhelper=udisks2,nodev,nosuid,uid=1001,gid=1001,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077” “/dev/sdb1” “/media/abhishek/SHADI DATA”‘ exited with non-zero exit status 32: mount: unknown filesystem type ‘exfat’

The reason behind this exFAT mount error

Microsoft’s favorite FAT file system is limited to files up to 4GB in size. You cannot transfer a file bigger than 4 GB in size to a FAT drive. To overcome the limitations of the FAT filesystem, Microsoft introduced exFAT file system in 2006.

As most of the Microsoft related stuff are proprietary, exFAT file format was no exception to that. Microsoft has been open sourcing few of its technologies and exFAT is one of them. The newly open sources exFAT file system will be supported in the upcoming Linux Kernel 5.4 release. You may check your Linux kernel version to make things sure.

But for Linux Kernel 5.3 and lower versions, it remains a proprietary software. Ubuntu and many other Linux distributions don’t provide the proprietary exFAT file support by default. This is the reason why you see the mount error with exFAT files.

Recommended Read:

Источник

Почему в Linux не открывается exFAT (РЕШЕНО)

Файловая система exFAT была представлена в 2006 году и была добавлена в более старые версии Windows с обновлениями для Windows XP и Windows Vista. exFAT оптимизирована для флэш-накопителей — она разработана для облегчённой файловой системы, такой как FAT32, но без дополнительных функций и дополнительных ресурсов NTFS и без ограничений FAT32.

Как и NTFS, exFAT имеет очень высокие ограничения на размеры файлов и разделов, что позволяет хранить файлы намного больше, чем 4 ГБ, разрешённые в FAT32.

Хотя exFAT не совсем совместим с FAT32, он более широко совместим, чем NTFS. В то время как Mac OS X поддерживает только NTFS только для чтения, Mac предоставляет полную поддержку чтения и записи для exFAT. Доступ к дискам exFAT в Linux можно получить, установив соответствующее программное обеспечение. PlayStation 4 поддерживает exFAT; PlayStation 3 нет. Xbox One поддерживает его, а Xbox 360 — нет.

Читайте также:  Linux перейти на флешку

Совместимость: Работает со всеми версиями Windows и современными версиями Mac OS X, но требует дополнительного программного обеспечения для Linux. Больше устройств поддерживают exFAT, чем NTFS, но некоторые, особенно старые, могут поддерживать только FAT32.

Ограничения: Можно сказать, что ограничений по размеру файлов или разделов нет.

Идеальное использование: используйте его, когда вам нужен больший размер файла, чем предлагает FAT32, и когда вам нужно больше совместимости, чем предлагает NTFS. Предполагая, что каждое устройство, с которым вы хотите использовать накопитель, поддерживает exFAT, вы должны отформатировать ваше устройство с exFAT вместо FAT32.

NTFS идеально подходит для внутренних накопителей, тогда как exFAT, как правило, идеально подходит для флэш-накопителей. Однако иногда вам может потребоваться отформатировать внешний диск в FAT32, если exFAT не поддерживается на устройстве, с которым вам необходимо его использовать.

Поддержка exFAT должна уже присутствовать на уровне ядра, но если у вас какие-то проблемы с данной файловой системой, то установите драйвер и пакет утилит, включающий программу-помощник монтирования.

Для установки в Debian, Linux Mint, Ubuntu, Kali Linux и их производные:

sudo apt install exfat-fuse exfat-utils

Для установки в Arch Linux и производные:

После установки пакета exfat-utils, если в вашей системе настроено автоматическое монтирование подключаемых карт памяти и дисков, система сама смонтирует носитель с файловой системой exFAT. Либо для ручного монтирования используйте команду mount как обычно:

sudo mount /dev/РАЗДЕЛ/ /ТОЧКА/МОНТИРОВАНИЯ/

Она, в свою очередь, воспользуется программами-помогателями /sbin/mount.exfat (/sbin/mount.exfat-fuse), но вам об этом не нужно заботиться — mount правильно определит файловую систему и смонтирует вашу карту памяти или флешку как надо.

Связанные статьи:

Источник

How To Read exFAT Partitions in Linux

After reading this tutorial, you will be able to read the content within exFAT (Extended File Allocation Table) partitions.

After the practical instructions, I briefly introduced the different Microsoft partition types, which will also help you understand the possible reasons behind your difficulty reading the exFAT file systems. Basic mount commands are also described at the end of this document.

All instructions in this tutorial include screenshots, making it easy for every Linux user to understand and apply them.

Reading exFAT Partitions in Linux

Before starting, let’s check existing partitions using the fdisk command followed by the -l (List) flag, as shown in the figure below. Remember to use sudo.

As you can see, there is a Microsoft basic data partition type.

This type of partition may include MBR (Master Boot Record), FAT16, FAT32, NTFS, and exFAT.

You also can use GParted to check the partition type.

As you can see, the partition /dev/sdc2 is an exFAT partition type.

Normally, the necessary packages to read exFAT partitions are already installed. In case they are not present in your system, you can install them on Debian-based Linux distributions by running the following command:

On RedHat-based Linux distributions, use the yum packages manager, as shown below:

Check the partition for errors using fsck, as shown below:

In the previous example, no errors were found.

See the following example where an error was found. If an error is found, type Y when requested and press ENTER.

Optionally, you can run the following command specifying the filesystem:

Читайте также:  Linux exec how to

Create a mount point; both name and location are arbitrary. In this example, I will create a directory named exfat under the system root directory:

Now, mount the exFAT partition in the created mount point, in my case /exfat.

You can check if the partition is readable by running the following command:

As you can see, the partition content shows up.

exFAT vs FAT32 vs NTFS

The FAT32 partition type was developed for Windows 95, replacing the older FAT16 type.

The biggest advantage of the FAT32 partition type is its compatibility with almost every device, including drives, USB sticks, TVs, game consoles, etc.

The biggest FAT32 disadvantage is it can not store files bigger than 4 GB. FAT32 partitions can not be bigger than 2 TB.

That’s why this filesystem type is being discontinued and replaced by NTFS.

While FAT32 partitions can not store files bigger than 4 GB, NTFS partitions support files up to 16 TB. NTFS also allows you to manage file permissions and create snapshots.

The exFAT file system was developed mainly for USB flash memories. This can be seen as an improvement of the old FAT32 file system without the 2 GB file size limit and with support for ACL (Access Control Lists).

The exFAT is supported by Windows XP SP2 and newer versions. It is also recognized by Android KitKat and newer Mac OS X, Linux, and iPadOS.

Some Mount Commands

In this tutorial, we mounted the exFAT file system without specifying its type (Because simple is better). But the mount command has the –t (Type) flag available to specify certain filesystems; you can use it.

In the following example, I only use the mount command to list ext4 filesystems.

To mount devices or partitions specifying their filesystem type, use the following syntax. Here, is the type (e.g., ext4), is the filesystem to mount (e.g., /dev/sdXY) and is the local directory where mounted files will become accessible.

To mount ISO images, you can use the following command:

Conclusion

By default, Linux systems should be able to mount exFAT partitions. Only in some cases are users unable to do it; some additional packages must be installed as described in the previous instructions. As you can see, mounting exFAT or any other filesystem type is pretty simple and can be achieved by any Linux user independently of the knowledge level. Mounting filesystems is among the most basic Linux knowledge users must acquire. On systems with X Window Managers, mounting can be done from the graphical interface using the file manager (Just right-click the filesystem to mount and press Mount). This was not included in this tutorial because the method varies from one distro to another, while the text mode through the console is valid for every Linux distribution.

Thank you for reading this tutorial explaining how to read exFAT filesystems in Linux. Keep following us for additional Linux professional content.

About the author

David Adams

David Adams is a System Admin and writer that is focused on open source technologies, security software, and computer systems.

Источник

Оцените статью
Adblock
detector