Format and Relabel a Flash Drive in Linux

Flash drives (as in memory sticks) are a popular choice for backups. A 64 Gb drive can be bought for just over £20 at the time of writing. Once your data is backed up to the drive, it is easy to store in a safe place or transport off site for added protection. Actually that applies to any portable hard drive, as does the following procedure.

Most flash drives come formatted as FAT32. That is fine from day-to-day but there is a strict 4 GB limit applying to the size of any file. Backup software is likely to produce large archive files well over 4 GB, so won’t work well with FAT32. What’s needed therefore, is a better file system.

A good choice is NTFS. It can handle much larger files (up to 16 EB). Also it is compatible with both Linux and Windows, which might come in handy if your Linux system is broken and you need to get your hands on the data as quick as possible.

I formatted an iBoutique 64 GB flash drive (£22, Amazon) as follows.

[root@pluto ~]# mkfs -t ntfs -f /dev/sdb1
Cluster size has been automatically set to 4096 bytes.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.

The “-f” option prevents the format from including a phase where it first overwrites the drive with zeros, very slowly.

Labelled the drive as below, giving it a meaningful name. First tried the “mlabel” command, but that failed with “no free slots“.

[root@pluto ~]# umount /dev/sdb1
[root@pluto ~]# ntfslabel /dev/sdb1 Boutique_64g

Done. Actually the drive came formatted as exFAT, which has a maximum file size of 16 EB, but not readable on Linux, or at least not yet.

One thought on “Format and Relabel a Flash Drive in Linux

  1. Thanks. It saved me a lot of time. I think the FAT32 is faster with smallish drives of 4 GB to 8 GB as long as the files aren’t too big. I backup mostly on a hard disk drive that was reformatted with the ext2 file-system. I just needed sothing to give to somebody else.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.