Ubuntu – FAT32 formatting

14.04fat32partitioningusb-drive

I just took a dive into the Ubuntu world jumping from Windows 7 to Ubuntu 14.04. I must say that I am impressed, I do like it a lot. However, I just ran into an unexpected problem; I have an LG DVD player w/USB support that I use to watch videos.
The problem is that the player no longer reads the files in my USB drive, it says that there are no files at all. I started getting this issue after I re-formatted the USB drive using FAT32 in Ubuntu.

Is Windows FAT32 different than Ubuntu's? It must be even though it shouldn't because the player is no longer able to read the files (or partition?).

Is there an Ubuntu tool/utility that will allow me to do a "Windows FAT32 format"?

I will really like to keep Ubuntu but I won't be able to if I cannot get my pen drive working on my DVD player. ANY suggestions guys?

Thanks in advance for your help?

Best Answer

Well this is weird to say the least. I'm guessing your TV's OS has additional requirements beyond simply FAT32. For example Windows XP has limitations on cluster size, number of clusters, and partition size when booting from FAT32 partitions (REF). Perhaps your TV doesn't like the allocation size? If that's not it then I don't know :P. You should check to see what allocation size you use when doing a format with Windows, and then use the same allocation size when formatting with Ubuntu.

Format With A Specified Cluster Size:

Steps:

  1. In your terminal type "sudo mkdosfs /dev/DISKANDPARTITION -s 16 -F 32".

This will format the entire device as VFAT32 with a 4096 byte allocation size which is commonly used by Windows. If you wish to adjust the size just replace "16" with the required number. Most disks uses 512 bytes sector sizes with the exception of the modern 4K disks (REF). 16x512bytes=4096bytes. You will need to substitute /dev/DISKANDPARTITION for the correct device and partition (something like /dev/sdb1).

Additional Information:

VFAT:

VFAT is an extension for FAT filesystem that adds support for long filenames (REF); systems that don't support VFAT but do support the underlying version of FAT will be able to read the partition using the underlying version of FAT (REF). VFAT is most commonly misused to refer to FAT32, but it can be applied to any version of FAT. Files saved to a VFAT partition will have 2 filenames: a short name for being read under FAT, and a long name for being read under VFAT (REF). If the file is renamed while accessed under FAT support then the long name is lost (REF). VFAT accomplishes this 2nd name by splitting the long name across directories; in locations that have a max folder limit you could end up severely limiting the number of files you can create in that directory (REF). The short name is made from the first six characters of the long filename, a tilde, and a number (REF). VFAT is used by default on both Windows 7, and Ubuntu 14.04 when creating FAT32 partitions.

Allocation Size:

Allocation size, also called cluster size is method of grouping sectors within a partition; sectors make up a cluster. Disks have a set number of sectors, and sectors have a specified data size typically 512 bytes (REF). You can think of a cluster as a box. Within that box a single file, or part of a file can be saved. You cannot save more than 1 file in a cluster. Due to this the last cluster used in a series to save a file will have free space remaining that cannot be used by the system for anything else. The amount of space wasted will depend on the size of the file, and size of the cluster. For example a small file of 1KB written to a 64KB cluster will result in 63KB of lost hard drive space. Cluster sizes will also have an impact on write speeds because it takes longer to fill more clusters. When storing large files it's better to use a large cluster size, and when storing small files it's better to have a small cluster size. Most people need a balance that leans towards the small cluster size. Because disks only have a set number of sectors, having larger cluster sizes reduces the number of clusters you can have, and therefore may reduce the number of files you can have.