Linux format exfat usb

Монтирование exFAT в Ubuntu

Файловая система FAT использовалась в качестве основной файловой системы в ранних версиях Windows, а потом начала применяться преимущественно для внешних носителей информации и различных флешек. Но у этой файловой системы есть несколько недостатков, самый заметный из которых — максимальный размер файла не более 4 Гигабайт.

В Microsoft были озабочены этой проблемой, и поэтому ещё в 2006 году была выпущена улучшенная версия этой файловой системы — exFAT. Здесь теоретический лимит на размер файла составляет уже 16 Эксабайт, что даже больше, чем достаточно. Но, как и другие продукты Microsoft, эта файловая система имеет закрытый исходный код и по умолчанию в Linux не поддерживается. В этой статье мы поговорим о том, как выполняется монтирование exFAT в Ubuntu

Монтирование exFAT в Ubuntu

Если вы попытаетесь примонтировать флешку или другой раздел, отформатированный в exFAT, в операционной системе Linux, то получите ошибку «mount: unknown filesystem type exfat», потому что эта файловая система не поддерживается.

Исправить такую проблему достаточно просто. Для этой файловой системы реализована поддержка Linux с помощью виртуальной файловой системы fuse. Для установки всех необходимых компонентов просто выполните:

sudo apt install exfat-fuse exfat-utils

После этого можно примонтировать раздел с exFAT ubuntu обычной командой монтирования:

Или же через файловый менеджер, просто найдите нужный раздел и откройте его:

Форматирование exFAT в Linux

Если вы хотите создать новый раздел в файловой системе exFAT, то для этого достаточно выполнить команду:

sudo mkfs -t exfat /dev/sdb1

Здесь /dev/sdb1 — адрес вашего раздела, который вам необходимо отформатировать в новую файловую систему.

Выводы

В этой небольшой статье мы разобрали, как примонтировать exFAT Ubuntu 18.04. Несмотря на то, что статья писалась про Ubuntu, эти команды будут работать и для большинства дистрибутивов, основанных на этой операционке.

Обнаружили ошибку в тексте? Сообщите мне об этом. Выделите текст с ошибкой и нажмите Ctrl+Enter.

Источник

How to format USB with exFAT on Linux

exFAT stands for Extensible File Allocation Table and is a format made by Microsoft for use on devices like USB flash drives. In general, you do not hear a lot about exFAT these days, but it remains a viable format that is compatible with Windows, MacOS, and Linux, so it is a good choice for a flash drive that you plan on using with a variety of different systems. Some manufacturers even use exFAT as the default format for their SD cards or other products.

exFAT has a lot of the advantages of FAT, such as a small overhead, but is not burdened by the same limitations. It is therefore able to support very large volume and file sizes like other modern formats. In this tutorial, we will show you how to format a USB drive with exFAT on a Linux system.

In this tutorial you will learn:

  • How to install the exFAT format on all major Linux distros
  • How to format a USB drive with exFAT via GUI
  • How to format a USB drive with exFAT via command line
Читайте также:  Mount mtp in linux

How to format USB with exFAT on Linux

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Any Linux distro
Software exfat-fuse, fdisk, gdisk
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to Enable exFAT formatting on major Linux distros

Some Linux distributions do not have the ability to format a drive with exFAT by default. However, we can install a package from the official repository on any major Linux distro that enables us to use the exFAT format.

You can use the appropriate command below to install exFAT formatting utility with your system’s package manager.

To install exFAT formatting utility on Ubuntu, Debian, and Linux Mint:

$ sudo apt update $ sudo apt install exfat-fuse

To install exFAT formatting utility on Fedora, CentOS, AlmaLinux, and Red Hat:

$ sudo dnf install exfatprogs

To install exFAT formatting utility on Arch Linux and Manjaro:

WARNING
Formatting the flash drive with exFAT will delete all data on it, unless you are only formatting one partition on the drive and have all your data on a different one. In our tutorial, we will be erasing the whole disk before creating an exFAT partition, so it is strongly recommended that you create a backup of your flash drive before continuing.

Format USB with exFAT via GUI

Depending on what Linux distribution or desktop environment you are using, the screenshots below may not match up with exactly what you see on your own screen. We are using Ubuntu Linux in these steps, but the process should be mostly the same no matter what distro you are on. The key point is that you will need to find and open your operating system’s disk utility software.

    Once you have inserted the USB flash drive disk into the computer, get started by opening your system’s disk management application.

Open the disk utility software from the application launcher

  • You should see your USB flash drive disk listed among the other storage devices on your system. Make sure you select the one that you wish to format. The disk is listed among the other storarge devices on the system
  • You will have several options on what to do with this flash drive. Click the one that says “Format Disk” or something similar. Select to format your USB flash drive
  • On our test system, we have a few different options for erasing and partitioning our USB thumb drive. A quick format will not securely erase the current data on the disk but it will perform the formatting very quickly, as the name implies. The other option is to rewrite the disk with all zeros (not necessary in the majority of situations). You can also create a MBR or GPT table, or apply no partitioning. If you are not sure, just leave the defaults selected and click “Format.” Choose formatting options or simply leave the defaults selected
  • As mentioned earlier in the guide, this process will completely erase the contents in your USB flash drive. The formatting software warns us once again to make sure we are aware, then it wipes the drive completely. Confirmation box about wiping all data on the USB flash drive
  • Next, we will add a new exFAT partition to our USB flash drive. In our application, we click on the plus sign to add a new partition. Click the appropriate option in your software. Click to add a new partition
  • Next, select the partition size. In our case, we will let our partition take up the entire USB disk. It is up to you if you want to allow additional room for adding other partitions later on. Select the desired size of the partition

    Читайте также:  Dungeon siege 2 linux
  • In the next menu, we need to select “other” when it asks what kind of file format we want to use. Remember, exFAT is not a particularly common format, so the choice is sometimes hidden under an additional prompt. Select to format with a different format than the ones listed here
  • Choose the exFAT format and then click Next. Choose to format the partition with exFAT
  • When the process is done, we can confirm that our partition has indeed been formatted with exFAT. The disks program shows that our partition is not formatted with exFAT
  • Format USB with exFAT via command line

    Once you have inserted the USB flash drive into your computer, open a terminal and type the following commands to format it with exFAT:

      First, let us figure out how to identify the media we wish to format. The name should start with /dev/sd and then a letter. Type the following command in terminal to see:

    Find your device name in the fdisk output

    Partition number (1-128, default 1): 1
    First sector (34-6291455966, default = 2048) or size: Last sector (2048-6291455966, default = 6291455966) or size:
    Current type is 8300 (Linux filesystem) Hex code or GUID (L to show codes, Enter = 8300): Changed type of partition to 'Linux filesystem'
    Command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): y OK; writing new GUID partition table (GPT) to /dev/sdb. The operation has completed successfully.

    We are finished partitioning the USB flash drive with the gdisk utility

    You will also need to reply Y to the confirmation prompt to verify that you indeed want to write these changes to the disk, and overwrite existing data.
    Since our block device is /dev/sdb, and we just created partition number 1 on the USB drive, that means our new partition is accessible under the path /dev/sdb1 . Next, we still need to add a file system to our USB drive. Use the mkfs command to format the flash drive with the exFAT file system.

    $ sudo mkfs -t exfat /dev/sdX1

    Formatting our USB flash drive with exFAT via the mkfs command on Linux

    We will now use the mount command to mount the newly formatted partition on our system. We will mount our flash disk drive to the /media/flashdrive directory.

    $ sudo mkdir -p /media/flashdrive $ sudo mount /dev/sdb1 /media/flashdrive

    That is all there is to it. You can now access your newly formatted exFAT flash drive under the /mount/flashdrive directory or where ever you decided to mount it. To make the USB drive get mounted automatically, see our guide on configuring the /etc/fstab file.

    Closing Thoughts

    In this tutorial, we saw how to format and partition a USB flash drive with the exFAT format from command line and GUI on a Linux system. Managing partitions is a dangerous task that should be performed with the utmost caution. Your flash drive should now be usable across major operating systems like Windows, MacOS, and Linux, and the exFAT format is both fast and capable of handling large files and volume sizes.

    Comments and Discussions

    Источник

    How to Format a USB Disk as exFAT on Linux [Graphically and Command Line]

    For a long time FAT has been the default choice of filesystem for formatting disks. It is compatible with pretty much all the major operating systems.

    The one major problem with FAT filesystem is that you cannot transfer a file larger than 4 GB. This means even if your USB disk has 32 GB of free space, if you try to transfer a ISO image or some other file greater than 4 GB in size, the transfer will fail.

    Читайте также:  Linux chmod not changing permissions

    This creates a problem in situation like when you are creating a bootable USB of Windows in Linux. You cannot use NTFS and FAT filesystem has that 4 GB size restrictions.

    To overcome the limitations of FAT filesystem, Microsoft came up with exFAT filesystem. And in this tutorial, I’ll show you how to format a USB disk in exFAT filesystem.

    Prerequisites

    Starting Linux kernel 5.4, exFAT filesystem support is enabled in the Linux kernel itself. Check which Linux kernel version you are running. If it is kernel 5.4 or higher, you should be fine (mostly).

    Otherwise, you can enable exFAT support explicitly.

    In Ubuntu 20.04 and lower versions, you can use the following command:

    sudo apt install exfat-fuse exfat-utils

    For Ubuntu 22.04 and higher, you should use this command instead:

    sudo apt install exfat-fuse exfatprogs

    Method 1: Format disk as exFAT using GNOME Disks tool

    Format disk in ExFAT format inLinux

    Formatting a drive using GNOME Disks is a straightforward job. It comes preinstalled in a number of Linux distributions.

    Plug in your external USB disk. Now, look for Disks in menu and open the GNOME Disks application. As a first step choose the drive that you want to format and follow the steps with me.

    Warning: Pay attention to the disk you are selecting to format. Don’t format your main disk accidentally.

    GNOME disks for formatting disks in Linux

    The commonly used file systems like Ext4, NTFS, FAT will appear first. To use exFAT, choose “Other” and then click on “Next“.

    Formatting disk as ExFAT disks in Linux

    Final step: choose exFAT file system on this screen and then click Create. Job done!

    Formatting disk as ExFAT disks in Linux

    See how easy it was to create a exFAT disk in Linux graphically? Now, let me show you the terminal method as well.

    Method 2: Format disk as exFAT in Linux command line (for advanced users)

    fdisk is a dialogue-driven command-line utility that creates and manipulates partition tables and partitions on a hard disk. In fact, it is considered one of the best partitioning tools for Linux.

    Plug in your external hard disk then type the following command in the terminal:

    using fidks to list disks

    This will list down all the hard disks and partitions in your computer. Identify the partition that you want to format in your external hard disk. Size of the disks should give you a hint. For me, the USB disk was labelled as /dev/sdb1.

    Once you have identified your USB disk, format it as exfat using the command below. Replace /dev/sdXn with your disk’s device ID. LABEL is basically the name you want to give to your disk like Data, MyUSB etc.

    sudo mkfs.exfat -n LABEL /dev/sdXn

    Use fdisk to format USB as exfat in Linux command line

    Optionally, run fsck check to make sure the formatting has been done properly.

    That’s it. Enjoy the exFAT disk.

    Did you succeed in creating exFAT disk?

    I hope you find this tutorial simple enough and a step forward to build a solid partitioning knowledge foundation.

    Sometimes easy and simple tips and tricks will make you a better Linux in the long term. Our frequent readers know that first hand but if you discovered It’s FOSS recently, you may take the opportunity to explore our handy tutorials.

    Don’t forget to subscribe and let me know your questions and suggestions in the comments below.

    Источник

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