Create and format exFAT partition from Linux

  • Is it possible to create and format an exFAT partition from Linux?

  • crater2150

    crater2150 Correct answer

    8 years ago

    Yes, there is a project implementing exfat and the related utilities at relan/exfat.

    To format a partition, use mkexfatfs / mkfs.exfat like with most filesystems, e.g.:

    mkfs.exfat /dev/sdX1
    

    As for creating the partition in the first place, this is the same as for any other filesystem. Create a partition in your favourite partition manager. If you have a MBR partition type, set its type to NTFS (that is code 7).

    Note, that some distributions only package the fuse module, so you may have to build it yourself.

    On Ubuntu I just had to install a couple packages first: `sudo apt-get install exfat-utils exfat-fuse`. Source: http://askubuntu.com/a/374627/18665

    To be clear, the code is 7 (hex), not 7h.

    On modern `fdisk` the type you want is `11` (Microsoft basic data). Disregard the google.code.com link in the answer and instead use @bmaupin's command on Debian/Ubuntu.

    be careful while doing this, it didnot warn me and completely deleted all the files I had in it. So first backup and then do it

    This worked fine for me. I already had the exfat and fuse installed. _BUT..._ the post blow from Billious is _misleading_. IF you have just formatted a drive, you must supply more information to `mkfs.exfat` -- Like where to put the partition and how big, _ya-da-ya-da_. I'm just lazy. I used `gParted` to set-u my USB how I wanted. Leave the partition you want to make exFAT alone. Or format it to FAT32 to process the whole USB. Next ensure the target partition is unmounted. Proceed, e.g.: `sudo mkfs.exfat -i DAT -n data /dev/sdc3`. I let `gParted` deal with alignments and such.

    Don't forget sudo.

    For people who boot from a live cd: standard debian i386 does not contain mkfs.exfat. If you don't have an internet connection you can't use exfat or ntfs, which is a shame.

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM